-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
fix(webpack): enable in memory caching when building for node in watch mode #18348
fix(webpack): enable in memory caching when building for node in watch mode #18348
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
5c90acb
to
888fc91
Compare
888fc91
to
e0d3d5c
Compare
Thank you so much for this. This was the single thing that was preventing me to upgrade to Nx 16, it was annoying to work on such a slow rebuild (more than 5 seconds for every code change). Adding
Pretty sure this is related to #17070 |
@jaysoo any chance you could take a look at this fix please? 😄 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request. |
Current Behavior
Using
@nx/webpack
for building node apps in watch mode is slow.After checking all nx versions we found the root cause was this PR: #16625
Setting
mode: 'none'
has the side effect of disabling webpack's in memory caching:https://github.com/webpack/webpack/blob/main/lib/config/defaults.js#L198-L200
Which in turn makes incremental rebuilds with large node apps have poor performance due to webpack re-compiling every file on change instead of just the affected files.
Expected Behavior
Using
@nx/webpack
for building node apps in watch mode is fastRelated Issue(s)
N/A