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

ESM imports broken in Next.js, causing bad performance #548

Open
flybayer opened this issue Mar 13, 2024 · 0 comments
Open

ESM imports broken in Next.js, causing bad performance #548

flybayer opened this issue Mar 13, 2024 · 0 comments

Comments

@flybayer
Copy link

Describe the bug

This package is making Next.js slow to compile because ALL languages and files are being imported, even if you only import a single language.

Next.js doesn't use the esm imports because the “fake esm” unofficial package key is being used, which the majority of packages using it assume is browser code, meaning Next can’t use it to bundle for the Node.js target.

See details from next.js maintainer: https://twitter.com/timneutkens/status/1768022841423732800

Expected behavior
ESM imports should be used in next.js to prevent compilation perf issues

Workaround
Only use explicit esm imports

image

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

No branches or pull requests

1 participant