-
Notifications
You must be signed in to change notification settings - Fork 12k
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
Implement vendor chunk support for esbuild builder #25283
Comments
For context esbuild does not support this evanw/esbuild#207 |
@alan-agius4 yes, I see before that issue, but, in that case, |
Hi @pumano, I did discuss this with @clydin, from initial testing we saw that with esbuild the lighthouse score were slightly better. Overall, vendor chunking should have only been used for development purposes. This only existed in the Webpack builder to workaround rebuild time issues that Webpack has. While indeed Esbuild does generate more chunks, this does not necessary mean they are all initial, and in the majority of cases this is done to return initial size which should improve CWV as Webpack's module concatenation causes a lot of unneeded code to be put in the initial chunk. Are you testing the lighthouse scores on a production or the Angular CLI dev-server? Testing with a dev-server can result in an incorrect scores since server config is a big part of this, such as response processing which differs greatly between vite and webpack-dev-server, compression, caching etc... It would be helpful to share your lighthouse reports. |
@alan-agius4 I prepare lighthouse comparison for our app with webpack and with esbuild (large app with around 60 libs inside monorepo): I can provide both build links for testing if needed (privately via some type of messenger or discord) |
Any reason why you don't use HTTP 2? From the screenshots above I can see that the initial requests more than doubled, from 54 to 110 requests.
It would we great if you could send them via discord. You can find me in discord.gg/angular |
We have some limitations now, but after this issue we also trying to looking for HTTP/2
I already sent you DM message |
Hi @pumano, We discussed the issue that you are facing and the root cause does appear to be because of using HTTP 1. With the new modern toolchain we recommend users using modern HTTP protocols such like HTTP/2 or HTTP/3 which nowadays are provided out of the box by the majority of hosting providers and CDNs. In the unlikely event that you still experience poor web vitals after using HTTP/2 or 3 please open a new issue. |
@alan-agius4 OK thank you, for detailed feedback. We will try to upgrade our infrastructure for using HTTP/2. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Command
build, serve
Description
When using esbuild builder, we got many chunks:
but that amount (we have around 50-65) not suitable for production use cases, because of performance application degradation due to poor web vitals. That happens due to absence of vendor chunk support. Yes we got that message, when we 'serve' app:
Describe the solution you'd like
Would be good to have support of vendor chunk when all node modules libs concatenated like webpack builder do.
That dramatically changed core web vitals due to small amount of initial chunks
Describe alternatives you've considered
No response
The text was updated successfully, but these errors were encountered: