-
Notifications
You must be signed in to change notification settings - Fork 10.3k
[Blazor] Switch to rollup for bundling #53095
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
Conversation
This sounds great to me! Switching over to rollup totally makes sense as we modernize and consider more modular output. I also investigated current JS bundler options in December for a different project and also concluded that Rollup was the most practical choice for that, so can relate to all the reasoning you gave when comparing the options. My only question is whether we know for sure that the updated minification mechanism will preserve the same APIs as we had before. We do have some E2E coverage to exercise some of the public APIs, but do you know if (in theory) the newer minification options might be mangling more of the pubternal JS API names than the older one did? |
I don't think this will be mangling more stuff, but I'll take a look from the JS side of things. I also expect all our API to be covered by E2E test to a large degree. Same for the 'pubternal' bits that are invoked from dotnet |
@SteveSandersonMS API looks fine |
OK great. If we discover anything did get moved (e.g., I see it's configured with |
Looking at modernizing our JS infrastructure I've compared a few bundlers. Namely:
Rollup is the most mature bundler that supports our use cases (current and future) and there is a clear path in the future as vite is working on its own rust based version of rollup 'rolldown'.
This is the initial work to replace the old version of webpack with an up to date bundler implementation that will allow us to generate not only commonjs bundles but also esm bundles. The PR also removes many old and stale dependencies that we weren't using. The bundle sizes are reduces between 0-2% depending on the bundle, which is likely negligible, but it's less than nothing.
Contributes to #52819