Closed deleonio closed 3 years ago
const app = Vue.createApp({})
app.config.isCustomElement = tag => tag === 'plastic-button'
I tried
// ./setup/main.ts
import { defineAppSetup } from '@slidev/types';
export default defineAppSetup(({ app }) => {
console.log(app);
app.config.isCustomElement = (tag) => {
console.log('isCustomElement', tag);
return tag === 'kol-counter';
};
});
// windi.config.ts
import vue from '@vitejs/plugin-vue';
export default { plugins: [ vue({ template: { compilerOptions: { isCustomElement: (tag) => { console.log('isCustomElement', tag); return tag === 'kol-counter'; }, }, }, }), ], };
It works
But unfortunately I can't get rid of the console error.
How we can use web components in slices?
https://github.com/slidevjs/slidev/issues/233