#How to import file programmatically?
4 messages · Page 1 of 1 (latest)
no there's not. That's because Vite is smart, parses all imports and turn them to static, at the same time time Vite cannot evaluate your variables state to know what to do. A real dynamic import will also disable Vite's processing path so not usable.
It feels like a dark light mode that's build time fixed.
Why not assign classes to html conditionally ?