-
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(js): add watchIgnore and runBuildTargetDependencies options to speed up build #17953
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
☁️ Nx Cloud ReportCI is running/has finished running commands for commit 9feff76. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this branch ✅ Successfully ran 1 targetSent with 💌 from NxCloud. |
What if we have
Is there a preference since both options can affect the same file? |
Personally, I think part of the perceived slowness is that the executor now eats the compilation logs. Previously, the user would see the webpack output so they knew it was working, now it just sits there without any feedback until it boots or fails. It would be convenient to have the output from the build task be written to the logger so the user can see what's actually being build/rebuilt. With the ignore option, it would be nice to have a flag to write the output of the watcher to the console to see what triggered the rebuild. Edit: |
I also use to put |
The build for |
a53c518
to
b04aa33
Compare
7033d78
to
b83172d
Compare
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. |
This PR addresses the slowness issues introduced when we updated the Node executor. Two additional options have been added.
watchIgnore
- A list of glob patterns to skip rebuilds (when the only changed files are ignored).watchRunBuildTargetDependencies
- When set totrue
, the rebuild will rerun dependency tasks. Default isfalse
.(1) lets users ignore files they know cannot affect the application. The alternative is to add to.gitignore
or.nxignore
, but this provides more granular control that is specific to the application.Instead of (1), users should add files to their
.nxignore
.(2) is for advanced usage where the application may not be bundled (thus dependencies must be rebuilt).
Current Behavior
Node executor is slow for everyone.
Expected Behavior
Node executor is fast for the normal use cases, with and advanced option to opt-into the slower but more correct build behavior (rerunning all dependency targets).
Related Issue(s)
Fixes #17070