Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
negezor opened this issue Sep 18, 2022 · 3 comments · Fixed by #937
Closed

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

negezor opened this issue Sep 18, 2022 · 3 comments · Fixed by #937

Comments

@negezor
Copy link

negezor commented Sep 18, 2022

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
Copy link

leomp12 commented Dec 22, 2022

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

@leomp12
Copy link

leomp12 commented Dec 22, 2022

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

@susnux
Copy link
Contributor

susnux commented Mar 5, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants