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

Packages shipped with ESM shouldn't be prebundled #2615

Closed
yaquawa opened this issue Mar 20, 2021 · 1 comment
Closed

Packages shipped with ESM shouldn't be prebundled #2615

yaquawa opened this issue Mar 20, 2021 · 1 comment

Comments

@yaquawa
Copy link
Contributor

yaquawa commented Mar 20, 2021

For example I'm using this package, which already support ESM module, but Vite is still going to prebundle it unless you put it in the optimizeDeps.exclude explicitly.

@patak-dev
Copy link
Member

This is expected, Vite needs to pre-bundle dependencies by default to avoid bottlenecks when the browser requests too many files. It doesn't matter if it is ESM. If you would like to avoid pre-bundling a dependency, as you said, there is an option available.

@github-actions github-actions bot locked and limited conversation to collaborators Jul 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants