Skip to content

Commit

Permalink
docs: add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
bluwy committed Nov 29, 2022
1 parent bfe604e commit 5fe2f2d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/vite/src/node/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -502,9 +502,10 @@ export async function resolveConfig(
if (userNodeEnv === 'development') {
process.env.NODE_ENV = 'development'
} else {
// NODE_ENV=production is not supported as it could break HMR in dev for frameworks like Vue
logger.warn(
`NODE_ENV=${userNodeEnv} is not supported in the .env file. ` +
`This is only used to control the NODE_ENV of a build. ` +
`Only NODE_ENV=development is supported to create a development build of your project. ` +
`If you need to set process.env.NODE_ENV, you can set it in the Vite config instead.`
)
}
Expand Down

0 comments on commit 5fe2f2d

Please sign in to comment.