Can't import from "fslightbox-vue/v3" using Vite in production mode
Opened this issue · 3 comments
lewebsimple commented
I was having a strange probleme where FsLighbox
would only work in development mode using Vite to build the project.
It turns out importing from fslightbox-vue/v3
was returning the component on the default
property, so I had to do this:
import FsLightboxV3 from "fslightbox-vue/v3";
const FsLightbox = FsLightboxV3.default || FsLightboxV3;
Any idea ?
ceciogit commented
Same here...
captainscorch commented
Thanks for providing a solution to this! I had the same issue.
andymark-by commented
I had the same. @lewebsimple Thx for your solution.
I thought that it can be fixed by optimizeDeps, but it doesn't work for me :(