fix custom sl- elements
parent
bb48aa28d5
commit
98a215cccf
|
@ -10,8 +10,6 @@ setBasePath(`${window.location.origin}/`);
|
|||
const app = Vue.createApp(App);
|
||||
app.use(router);
|
||||
|
||||
app.config.isCustomElement = (tag: string) => Boolean(tag.match(/^sl-/));
|
||||
|
||||
app.directive("sl-model", {
|
||||
beforeMount: (element: Element, binding: DirectiveBinding<string>) => {
|
||||
element.addEventListener("sl-input", (event) => {
|
||||
|
|
|
@ -4,6 +4,16 @@ const CopyPlugin = require("copy-webpack-plugin");
|
|||
module.exports = {
|
||||
lintOnSave: false,
|
||||
chainWebpack: config => {
|
||||
config.module
|
||||
.rule('vue')
|
||||
.use('vue-loader')
|
||||
.tap(options => {
|
||||
const compilerOptions = {
|
||||
}
|
||||
compilerOptions.isCustomElement = (tag) => tag.startsWith('sl-');
|
||||
options.compilerOptions = compilerOptions;
|
||||
return options
|
||||
});
|
||||
config.plugin("copy-icons").use(CopyPlugin, [
|
||||
[
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue