vue-final / vue-final-modal

🍕Vue Final Modal is a tiny, renderless, mobile-friendly, feature-rich modal component for Vue.js.
https://vue-final-modal.org
MIT License
862 stars 95 forks source link

Rename module extension to mjs #401

Closed AdamMerrifield closed 7 months ago

AdamMerrifield commented 7 months ago

vue-final-modal fails to import during SSR because the module is seen as a commonjs module and not an ES module.

More information here: https://nodejs.org/api/esm.html#resolution-algorithm

Relevant section:

Screenshot 2023-11-11 at 3 09 21 PM

Here is a minimum example. https://stackblitz.com/edit/github-4qeonz?file=README.md

In this example pnpm dev functions fine, but pnpm build fails

Screenshot 2023-11-11 at 3 09 03 PM

fixes #404 fixes #326 fixes #365