Next.js dynamic import + zoom plugin? #289
-
Hello, we're using next/dynamic to import YARL as demonstrated in your example here: https://stackblitz.com/edit/yet-another-react-lightbox-nextjs-dynamic?file=app%2Fpage.tsx This is working wonderfully. Unfortunately, it required us to remove the zoom plugin, because we couldn't get it working without errors. Would it be possible demonstrate the correct way to do that, assuming it's possible? Thank you. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
What kind of errors did you run into? Can you share a repro? I just tried adding Zoom plugin to the demo you mentioned above, and everything worked just fine. |
Beta Was this translation helpful? Give feedback.
-
The errors we were getting had to do with the import. Whether we did a normal import or tried to import it dynamically, it would produce an error. Could you possibly share the version of the demo where you added the Zoom plugin successfully? My guess is it's something that should be obvious but we're just not seeing it. |
Beta Was this translation helpful? Give feedback.
-
Yep, this worked... thank you very much. |
Beta Was this translation helpful? Give feedback.
Here you go:
https://stackblitz.com/edit/yet-another-react-lightbox-289?file=app%2Fpage.tsx,components%2FLightbox.tsx