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): apply default value for NODE_ENV environment variable #4003

Merged
merged 2 commits into from Sep 28, 2018

Conversation

pi0
Copy link
Member

@pi0 pi0 commented Sep 28, 2018

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

Related to #4002. Some tools (Including the current version of vue-loader) implicitly use process.env.NODE_ENV to align their options. This change only sets the best value for NODE_ENV if not already set so it won't break anything.

  • The reason for including before any require() is that some modules may need this env during evaluation.
  • The reason for not refactoring this logic inside bin/nuxt is binaries portability. (nuxt-start directly is being called)

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)
  • All new and existing tests pass.

@codecov-io
Copy link

codecov-io commented Sep 28, 2018

Codecov Report

Merging #4003 into dev will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##              dev    #4003   +/-   ##
=======================================
  Coverage   97.56%   97.56%           
=======================================
  Files          18       18           
  Lines        1233     1233           
  Branches      337      337           
=======================================
  Hits         1203     1203           
  Misses         29       29           
  Partials        1        1

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 d7fa66d...eb0b714. Read the comment docs.

@manniL
Copy link
Member

manniL commented Sep 28, 2018

Related (though closed already): #2998

@Atinux Atinux merged commit 0c1d94a into dev Sep 28, 2018
@Atinux Atinux deleted the fix/default-node-env branch September 28, 2018 16:23
@lock
Copy link

lock bot commented Oct 31, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Oct 31, 2018
@danielroe danielroe added the 2.x label Jan 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants