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

Future: Move from Rollup to Rolldown #4669

Open
birkskyum opened this issue Sep 6, 2024 · 2 comments
Open

Future: Move from Rollup to Rolldown #4669

birkskyum opened this issue Sep 6, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@birkskyum
Copy link
Member

birkskyum commented Sep 6, 2024

We use rollup for bundling.

The vast majority of Rollup use today happens as part of vite projects (stats).

The Vite team use rollup for prod builds, because of the larger feature set and flexible plugin system (supports bundle splitting and more), but rollup is really slow compared to a lot of alternatives, so for dev builds esbuild is used instead.

To simplify Vite, the Rolldown projects is in development - it's a rust port of rollup, with compatible api/feature set, and performance superior to esbuild.

We can swap to Rolldown with minimal changes when there's a stable release. It's quite far (Roadmap) in development already - I've tested the latest release in this codebase, and it's getting there.

This would make the CI faster, and tasks that require adjusting and validating the build config many times would be easier:

@HarelM
Copy link
Collaborator

HarelM commented Sep 6, 2024

I think we should evaluate this when it's a lot more stable and widely used.
Last time we did a build change (I think it was swc) it ended up being rolled back due to issues we couldn't solve, and maybe only because we tried to use it prematurely.
We have a relatively complicated build (unfortunately) and we need this to work well - be battle tested.
Just to clarify, I'm not against it, I just want to make sure we don't repeat past mistakes.

@HarelM HarelM added the enhancement New feature or request label Sep 6, 2024
@birkskyum
Copy link
Member Author

birkskyum commented Sep 9, 2024

I fully agree, I've been thinking a lot about our options in this space and recently seen the tangible performance gain in bundling (10-20x) and work required to move to esbuild, and I just wanted to offload my thoughts on the topic, because one option looked more feasible than others.

It would be neat to get a native bundler (like swc/esbuild), but only if it's low cost to migrate (which in our rullup-setup would be rolldown), and regarding stability I also think it's only worth considering after it has becomes the Vite default.

TSC for type checking isn't really possible to replace. I did the mistake in attempting this with SWC (didn't understand the project scope), which resulted in the rollback. There's one or two projects (not ready) still attempting to make a native type checker (Ezno), but most have now admitted defeat (SWC/STC), and there's now a lot of resistance in attempting this feat.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants