-
-
Notifications
You must be signed in to change notification settings - Fork 9.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
Webpack: Make manager and preview build processes cancelable #17809
Conversation
☁️ Nx Cloud ReportCI is running/has finished running commands for commit 1da2437. 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. |
@ndelangen any ideas about the Typescript issues? weird that they don't happen locally while editing or building (but they do when running |
I think I resolved the typescript issues... I also changed the return type of the builders in case an error occurs. I think in-line with #15885 |
…kjs/storybook into feat/cancelable-builder-process
Issue: N/A
What I did
Transformed the build and start steps, for both manager and preview, for both webpack4 and webpack5, so that they are all generators. This allows us to e.g. cancel the execution of preview when manager fail and vice versa.
The reason we need this is because the processes happen in parallel, so we need a generator in order to get some control over their executions.
There are lots of duplication between the builders, they certainly can be improved.
co-authored by @ndelangen
How to test
repro.mp4
Sample code from video:
If your answer is yes to any of these, please make sure to include it in your PR.