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

Fix exports of package to allow including in node module project #935

Closed
wants to merge 1 commit into from
Closed

Conversation

susnux
Copy link
Contributor

@susnux susnux commented Mar 5, 2023

Currently the package can not be imported in a type="module" node project (ESM) because the floating-vue package has no type set, so it is a commonjs project. Therefor all .js files are interpreted as commonjs and importing fails with:

SyntaxError: Named export 'Dropdown' not found. The requested module 'floating-vue' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:

This is fixed by changing the file extension for ESM files and using correct package exports instead of never officially supported module entry point.

@susnux
Copy link
Contributor Author

susnux commented Mar 8, 2023

replaced by #937

@susnux susnux closed this Mar 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Crashes in ESM SSR: Cannot use import statement outside a module
1 participant