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

using esbuild to bundle node_modules instead of commonjs to speed up build #3193

Closed
hardfist opened this issue Apr 28, 2021 · 4 comments
Closed

Comments

@hardfist
Copy link
Contributor

hardfist commented Apr 28, 2021

Clear and concise description of the problem

vite build is kind of slow because it uses rollup-plugin-commonjs to transform node_modules cjs module to esm, which is slow and tricky.

Suggested solution

we may bundle node_modules using esbuild instead of rollup-plugin-commonjs in build(which dev already did), and it not only speeds up build speed dramatically and consistent with dev mode.
And I made an poc here #3192

Alternative

Additional context

@hardfist
Copy link
Contributor Author

/cc @antfu @underfin

@Shinigami92 Shinigami92 linked a pull request Apr 28, 2021 that will close this issue
9 tasks
@thelinuxlich
Copy link

you could provide this as a plugin

@bluwy
Copy link
Member

bluwy commented Mar 6, 2022

This has also been discussed in #4921

@bluwy
Copy link
Member

bluwy commented Jun 25, 2022

Supported in #8280

@bluwy bluwy closed this as completed Jun 25, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Jul 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
3 participants