-
Notifications
You must be signed in to change notification settings - Fork 27k
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
Compilation cancelation #1083
Comments
+1. This is really really annoying |
@msand thanks for pinging that issue. I just realized not having cancelation is not only a "nice to have", but it's absolutely critical for scenarios like changes that happen in quick succession. For example, |
Maybe during the build something could listen (somehow connected to watching file saves/changes) and throw an error, so the build fails/stops, so before every save of a file the current build listening (if there is one running) would fail before the next one starts. Would building something for that somehow be an OK solution to this issue? |
Just saw webpack/webpack#1702 this issue and @TheLarkInn mentioned that Nuxt.js does great for this. So I read its code and seems Nuxt.js is using chokidar as the file watcher rather than Webpack, and also it's using Webpack supports this "rebuild delay" and we can add this feature to Next.js really quickly by add What do you say? I think this might be very useful. UPDATE: |
I'd like to try implementing a demo using the idea of Webpack's |
Hmmm seems really hard to implement it. I digged into the Webpack code and it turns out that, in the watch mode, although there's an undelayed callback for the file watcher, but the file change event will still be blocked by the current compilation. Maybe it's because the ongoing compilation and the file watcher run in the same single thread. Same issue here: webpack/webpack#5929 |
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Sometimes you make a change, then want to quickly make another change
Webpack doesn't seem to do cancelation by default? Which means a lot of wasted time!
The text was updated successfully, but these errors were encountered: