banthagroup/fslightbox-vue

Can't import from "fslightbox-vue/v3" using Vite in production mode

Opened this issue · 3 comments

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 ?

Same here...

Thanks for providing a solution to this! I had the same issue.

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 :(