Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

fix(kit): avoid behavior change based on NODE_ENV #3751

Merged
merged 4 commits into from
Mar 17, 2022
Merged

Conversation

pi0
Copy link
Member

@pi0 pi0 commented Mar 17, 2022

πŸ”— Linked issue

resolves nuxt/nuxt#13399

related #3693 (comment)

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

If NODE_ENV is set to anything other than development, nuxi dev will build for production! This issue was because we weren't setting dev override and nuxt falling back to std-env to detect it.

As to fix the root-cause, kit purely depends on C12 config types to avoid creating confusing interfaces that made this issue happen.

Options of loadNuxt changes (rootDir => cwd, config => overides) but preserved as backward compatibility.

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@netlify
Copy link

netlify bot commented Mar 17, 2022

βœ”οΈ Deploy Preview for nuxt3-docs canceled.

πŸ”¨ Explore the source changes: c8d1ef0

πŸ” Inspect the deploy log: https://app.netlify.com/sites/nuxt3-docs/deploys/623393c77f19be00081c5ee0

@pi0 pi0 mentioned this pull request Mar 17, 2022
7 tasks
@pi0 pi0 changed the title fix(kit, nuxi): avoid behavior change based on NODE_ENV fix(kit): avoid behavior change based on NODE_ENV Mar 17, 2022
@pi0 pi0 merged commit 7d94595 into main Mar 17, 2022
@pi0 pi0 deleted the fix/node-env-behavior branch March 17, 2022 20:10
@danielroe danielroe added the 3.x label Jan 19, 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.

CLI should warn about $NODE_ENV dependency
2 participants