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(cli): initialize server for build when there pages should be gene… #6525

Merged
merged 2 commits into from
Oct 8, 2019

Conversation

aldarund
Copy link

@aldarund aldarund commented Oct 7, 2019

…rated

fixes #6519

Types of changes

  • Bug fix (a non-breaking change which fixes an issue)
  • New feature (a non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Description

In spa mode we need to generate page, so hence need server to be initialized

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly. (PR: #)
  • I have added tests to cover my changes (if not applicable, please state why)
  • [x ] All new and existing tests are passing.

@codecov-io
Copy link

Codecov Report

Merging #6525 into dev will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##              dev    #6525   +/-   ##
=======================================
  Coverage   95.67%   95.67%           
=======================================
  Files          79       79           
  Lines        2706     2706           
  Branches      698      699    +1     
=======================================
  Hits         2589     2589           
  Misses        101      101           
  Partials       16       16
Flag Coverage Δ
#e2e 100% <ø> (ø) ⬆️
#fixtures 50.59% <0%> (ø) ⬆️
#unit 92.38% <100%> (ø) ⬆️
Impacted Files Coverage Δ
packages/cli/src/commands/build.js 86.36% <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 7688825...e04731f. Read the comment docs.

@pi0 pi0 merged commit 136777d into dev Oct 8, 2019
@pi0 pi0 deleted the fix/build-spa-mode branch October 8, 2019 08:33
@pi0 pi0 mentioned this pull request Oct 8, 2019
@clarkdo
Copy link
Member

clarkdo commented Oct 8, 2019

Initialise server in build will affect some functionalities which depend on runtime.

For example, modern will be detected at runtime and changed to false, so the modern build won't be triggered if you build more than once, and this issue was raised by @aldarund before.

Currently only enable it for generate should be safe, but maybe we can improve it in next minor release, like initialising server lazily just before rendering in generating, the the building phase won't be affected.

@pi0
Copy link
Member

pi0 commented Oct 8, 2019

Thanks @clarkdo for clarifications. Can we probably keep an open issue for improvements?

@clarkdo
Copy link
Member

clarkdo commented Oct 8, 2019

#6531

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.

nuxt build fails with spa mode
5 participants