-
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
serve command: double processing in CLI 12 > Browser application bundle generation complete. #20809
Comments
Is this reproducible in a project that does not use nx? |
@clydin It's a question. I am working mainly with Nx environment, so I need to prepare a standalone project. This issue is also meant to catch experiences from others, so we will see. |
@akaufmann, that is expected when NGCC runs and has been the case for a number of major versions. |
Thanks @alan-agius4! This is nothing I'm worried about. The only thing that is a bit unclear is why it builds a second browser app bundle for HMR only when NGCC had run? Is this bundle stored somewhere for the next |
NGCC will amend the package.json file which will cause webpack to re-trigger a partial re-compilation even though it doesn't effect the output. |
@alan-agius4 Your last comment was related to which one? It's not happening in 11.2.x. |
ngcc rewrites files in the node modules directory which can trigger rebuilds. If the extra compilation is only happening when ngcc executes then this is unfortunately expected. Webpack 5, which is used within v12, has a completely rewritten file watching system so watch behavior may differ from v11. Luckily as libraries move to the new Ivy compilation mode, ngcc will be used less and less. |
Yes, it happens on each |
Kindly provide a reproduction so that we can investigate. Thanks. |
Closing since no reproduction was provided. Feel free to open a new issue when you have a reproduction. |
@simeyla Yep, it's the same problem. The great news is that it was explained and fixed. The 12.0.3 will be released probably today or tomorrow, so super. PS: I had a problem with reproducing it using a simple project, especially in combination with Nx. |
@mlc-mlapis I've still been seeing this problem but just updated to CLI 12.1 and no longer seeing it. |
@simeyla Since version 12.0.3, I could see the irregular observations of the problem also in 12.0.4 or 12.0.5 (rarely from time to time). I can't say the same for 12.1.0 yet. But we have to wait a bit, probably. |
@mlc-mlapis I'm afraid I spoke too soon. It does seem to be happening a lot less, but I've just seen it again - running the build many times in succession and just saw it one time in ten. It used to happen every single build, so I'm not sure if I'm just getting lucky or if it was partially fixed. :-( |
@simeyla I think that there is still something on the table. Not sure what. |
@mlc-mlapis are you running |
@simeyla Yes, it's on Windows, and it really seems that it's specific only for this platform. It's a non-blocking problem so that people can live with it. 😄 |
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. |
🐞 Bug report
Is this a regression?
Yes, the previous version in which this bug was not present was: CLI 11.2.13
Description
Each command
ng serve
ornx run myapp:serve
leads to the situation that it looks like double processing:Build at: 2021-05-15T18:26:37.746Z - Hash: ecbd21f6a2b7772c6755 - Time: 154931ms
Build at: 2021-05-15T18:27:00.757Z - Hash: cf1562cbbca533d796f4 - Time: 10838ms
It's unclear what it means. It seems that the same doesn't happen with an incremental build.
🔥 Exception or Error
🌍 Your Environment
The text was updated successfully, but these errors were encountered: