-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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: improve watching experience for generated files #6257
Conversation
Codecov Report
@@ Coverage Diff @@
## dev #6257 +/- ##
==========================================
- Coverage 95.76% 95.73% -0.03%
==========================================
Files 80 80
Lines 2666 2673 +7
Branches 687 689 +2
==========================================
+ Hits 2553 2559 +6
- Misses 97 98 +1
Partials 16 16
Continue to review full report at Codecov.
|
Expecting the strange failing test 🤔 |
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.
Looks good, hope this improves DX indeed!
* [release] * fix(vue-app): enforce default css when used with frameworks (#6255) * chore(deps): update dependency serialize-javascript to ^1.8.0 (#6254) * fix(config): provide typescript backward compatibility (#6258) * fix(vue-app): only overwrite leave listener when none provided or without done arg (#6264) * fix(nuxt-start): add missing `vue-client-only` dependency (#6267) * fix(server): treat `https: null` as `https: undefined` (#6265) * chore(deps): update devdependency rollup to ^1.20.0 (#6268) * fix: improve watching experience for generated files (#6257) * refactor(core): use hable (#6271) * test: disable terser/minify by default (#6290) * chore(deps): update devdependency rollup to ^1.20.1 (#6282) * chore(cli): accept hooks (#6274) * chore(deps): update devdependency rollup-plugin-alias to v2 (#6281) * fix(builder): apply overrides from app dir only (#6283) [release] * feat: function watchQuery (#6245) * Revert "feat: function watchQuery (#6245)" (#6296) This reverts commit 3c61830. * chore(deps): update devdependency rollup to ^1.20.2 (#6295) Co-authored-by: Renovate Bot <bot@renovateapp.com> * test(vue-app): add template compiler helper (#6299) * test: add jest roots for less greedy test search (#6300) * test: remove unnecessary generate (#6301) * fix: update the minimal require node version in distributions (#6310) * chore(deps): update devdependency babel-eslint to ^10.0.3 (#6304) * chore(deps): lock file maintenance (#6305) * chore: upgrade circleci config to v2.1 (#6312) * test: add test for modern bundle size (#6302) * test: add client-only test to basic fixture (#6315) test: check for no-ssr deprecation warning
Types of changes
Description
Nuxt has a frustrating DX issue when a page file is deleted or renamed. Webpack starts to rebuild as soon as the file is changed while still generated files (like
.nuxt/router.js
) are referring to the old file. This is happening because we debouncegenerateRoutesAndFiles
function (also there is a little generation/fs process time) but webpack rebuilds as soon as possible. Causing a failing intermediate build like this:This PR set a longer default for aggregateTimeout (200ms + ~800ms of generating process). That fixes the problem in normal cases when generation takes less than 800ms: (previously deadline was ~100ms)
Webpack watch will be also suspended during generate files and resumed/invalidated thanks to pausing/resume introduced webpack/webpack#9214 (@jkzing ❤️)
Checklist: