-
Notifications
You must be signed in to change notification settings - Fork 254
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
Switch from parcel to esbuild #432
Conversation
4cff1e3
to
15cf0e2
Compare
I tried to revive this as an alternative to #492, but ran into problems with code splitting. Here's the waterfall for loading the chunks created for parcel: And here's the waterfall for loading chunks created by esbuild: Ignore the sizes -- this is esbuild in development v.s. parcel in production. The parcel version is minified & gzipped. The part that's a dealbreaker for me is that esbuild generates 6 chunks instead of the desired 4, and requires 2 round trips before the main chunk executes ( An example of where this happens is In parcel's implementation, this code is contained in the main chunk and then somehow referenced from inside of the This is a bummer! I could work around the network waterfall by embedding those initial chunk dependencies directly into the page, but I'd still lose out on compression benefits of having all of the main chunk's contents in a single network payload. It's possible, however, that the benefits of using the esbuild esm target w/ minification outweighs the loss caused by shared compression.
Those add up to less than the size of just compressing the version output by parcel v1. So if I can get the initial chunks to all load as part of the initial load by embedding multiple script tags, then maybe this is still a performance improvement. |
I resolved most of the above performance problems, but it unfortunately breaks the version of the build which runs purely off of The problem is that
Of these, I'm leaning towards option 1 at the moment |
…cked contents from npm
No timeline on this -- was just curious how close to drop-in it would be.
Some things that need addressing before this can land:
.html
file to do optimizationFixes #295