Closed Rolanddoda closed 2 years ago
Maybe you can try to use https://vitejs.dev/guide/features.html#glob-import to implement the same feature.
I turned on sourcemap
option and located the following error
I'm getting the same Error: Unknown variable dynamic import
with SvelteKit and vite-imagetools
. In dev it works as expected, building fails.
const { default: src } = await import(`./${slug}/cover.jpg?width=672`);
Getting this as well.
Describe the bug
First, open the simple reproduction on Stackblitz. You will see that everything works there. If you run
vite build && vite preview
though, you will see the error:Reproduction
https://stackblitz.com/edit/vitejs-vite-cm8srg?devtoolsheight=33&file=src/components/SvgIcon.vue
System Info
Used Package Manager
npm
Logs
No response
Validations