fix custom sl- elements

feat/vaults
Tomáš Mládek 2021-05-24 19:53:15 +02:00
parent bb48aa28d5
commit 98a215cccf
2 changed files with 10 additions and 2 deletions

View File

@ -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) => {

View File

@ -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, [
[
{