mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-26 07:32:01 +00:00
refactor(nuxi): improve env update message (#5430)
This commit is contained in:
parent
95b38e241d
commit
9d28c0adbb
@ -1,7 +1,7 @@
|
|||||||
export const overrideEnv = (targetEnv: string) => {
|
export const overrideEnv = (targetEnv: string) => {
|
||||||
const currentEnv = process.env.NODE_ENV
|
const currentEnv = process.env.NODE_ENV
|
||||||
if (currentEnv && currentEnv !== targetEnv) {
|
if (currentEnv && currentEnv !== targetEnv) {
|
||||||
console.warn(`Changing \`NODE_ENV\` from \`${currentEnv}\` to \`${targetEnv}\`.`)
|
console.warn(`Changing \`NODE_ENV\` from \`${currentEnv}\` to \`${targetEnv}\`, to avoid unintended behavior.`)
|
||||||
}
|
}
|
||||||
|
|
||||||
process.env.NODE_ENV = targetEnv
|
process.env.NODE_ENV = targetEnv
|
||||||
|
Loading…
Reference in New Issue
Block a user