File tree 2 files changed +6
-1
lines changed
2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -406,7 +406,9 @@ export async function resolveConfig(
406
406
// Note it is possible for user to have a custom mode, e.g. `staging` where
407
407
// production-like behavior is expected. This is indicated by NODE_ENV=production
408
408
// loaded from `.staging.env` and set by us as VITE_USER_NODE_ENV
409
- const isProduction = ( process . env . VITE_USER_NODE_ENV || mode ) === 'production'
409
+ const isProduction =
410
+ ( process . env . NODE_ENV || process . env . VITE_USER_NODE_ENV || mode ) ===
411
+ 'production'
410
412
if ( isProduction ) {
411
413
// in case default mode was not production and is overwritten
412
414
process . env . NODE_ENV = 'production'
Original file line number Diff line number Diff line change 1
1
const fs = require ( 'fs' )
2
2
const vue = require ( '@vitejs/plugin-vue' )
3
3
4
+ // Overriding the NODE_ENV set by vitest
5
+ process . env . NODE_ENV = ''
6
+
4
7
/**
5
8
* @type {import('vite').UserConfig }
6
9
*/
You can’t perform that action at this time.
0 commit comments