Skip to content
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(builder): watch store dir and serverMiddleware paths #5681

Merged
merged 12 commits into from May 10, 2019
Merged

Conversation

Atinux
Copy link
Member

@Atinux Atinux commented May 9, 2019

Types of changes

  • Bug fix (a non-breaking change which fixes an issue)

Description

Problems

Right now, when we use serverMiddleware and change them (the files linked to options.serverMiddleware), a restart happen but the file is cached, leading to a useless restart.

The other problem is when we start a nuxt app without a store/ directory, and while running nuxt dev, when we add the directory with a file in it (store/index.js), Nuxt does nothing and we have to manually restart the project (really annoying).

Solution

  • Watch paths of serverMiddleware + clear cache of the file

  • Watch store/ directory for full reload when this.options.store === false
    nuxt-store-fix

Checklist:

  • All new and existing tests are passing.

@Atinux Atinux requested review from pi0 and clarkdo May 9, 2019 12:44
@codecov-io
Copy link

codecov-io commented May 9, 2019

Codecov Report

Merging #5681 into dev will increase coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev    #5681      +/-   ##
==========================================
+ Coverage   95.57%   95.59%   +0.01%     
==========================================
  Files          81       81              
  Lines        2645     2656      +11     
  Branches      673      679       +6     
==========================================
+ Hits         2528     2539      +11     
  Misses         98       98              
  Partials       19       19
Impacted Files Coverage Δ
packages/builder/src/builder.js 100% <100%> (ø) ⬆️
packages/utils/src/lang.js 100% <100%> (ø) ⬆️
packages/cli/src/commands/dev.js 85.18% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8588ca9...470dda0. Read the comment docs.

@nuxt nuxt deleted a comment from codecov-io May 9, 2019
@pi0 pi0 changed the title fix(builder): Watch store dir (when false) and serverMiddleware paths fix(builder): watch store dir and serverMiddleware paths May 10, 2019
@pi0 pi0 mentioned this pull request May 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants