vite-ssg
vite-ssg copied to clipboard
Add compilerOptions.isCustomElement
Hi, I am trying to use a custom native element, but I cannot find a way to ignore from the list of components
Here is the warning I am getting:
Failed to resolve component: model-viewer
If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.
// src/main.ts
export const createApp = ViteSSG(
App,
{ routes },
({ app, router, routes, isClient, initialState }) => {
app.config.compilerOptions.isCustomElement = tag => tag.startsWith('model-viewer')
}
)
Or you can try passing compiler options to vite plugin: https://github.com/vitejs/vite/tree/main/packages/plugin-vue#example-for-passing-options-to-vuecompiler-dom