banthagroup / fslightbox

An easy to use vanilla JavaScript plug-in without production dependencies for displaying images, videos, or, through custom sources, anything you want in a clean overlying box.
MIT License
345 stars 30 forks source link

Using with Nuxt3 build #197

Open Stiropor opened 2 years ago

Stiropor commented 2 years ago

Hi, we're having pro version, works very well with Nuxt3 while developing. Building it (or putting on Netlify) however doesn't work. No errors or anything, just doesn't open, also no events (like init) get dispatched. Has anyone came upon this problem?

rolfkoizumi commented 1 year ago

Same behaviour in the basic version with Vue 3/Typescript. Developing works fine, production-build however doesn't show the Lightbox, no error and nothing. Trying to debug this currently.

tomleiter commented 1 year ago

has anyone found a solution? I haven't found the bug after spent many hours... Same Problem. DEV Works, Build & Generate doesn't show the lightbox.

tomleiter commented 1 year ago

Use:

import FsLightboxV3 from "fslightbox-vue/v3";
const FsLightbox = FsLightboxV3.default || FsLightboxV3;

and it works...