Akryum / floating-vue

💬 Easy tooltips, popovers, dropdown, menus... for Vue
https://floating-vue.starpad.dev/
MIT License
3.3k stars 337 forks source link

Crashes in ESM SSR: Cannot use import statement outside a module #896

Closed negezor closed 1 year ago

negezor commented 1 year ago

Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.

Applying any of the above fixes the problem of my ESM SSR server crashing. I'm using a clean Vite build for SSR.

leomp12 commented 1 year ago

Same problem here 🙃 Output file should be floating-vue.mjs instead of floating-vue.es.js

leomp12 commented 1 year ago

I'm importing respective src file for now import VTooltip from 'floating-vue/src/directives/v-tooltip';

susnux commented 1 year ago

I encountered the same problem and submitted a PR which will fix it: #935