You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First off thank you for maintaining such a great project, and I 100% understand if you don't want this change.
During the building of a Vite project it replaces instances of the code 'process.env.NODE_ENV' with the literal '"production"' this causes a syntax error in the isDev function in lib/utils/index.js as it calls global.process.env.NODE_ENV. If this code were changed to global.process.env['NODE_ENV'] it would work with vite.
diff --git a/lib/utils/index.js b/lib/utils/index.js
index 832dde65..116874e6 100644
--- a/lib/utils/index.js+++ b/lib/utils/index.js@@ -31,7 +31,7 @@ function isText(txt) {
// Proper configuration is having NODE_ENV = 'development', but this
// method only checks for 'dev' being present, and regardless of the case.
function isDev() {
- const env = global.process.env.NODE_ENV || '';+ const env = global.process.env[`NODE_ENV`] || '';
return env.toLowerCase().indexOf('dev') !== -1;
}
The text was updated successfully, but these errors were encountered:
First off thank you for maintaining such a great project, and I 100% understand if you don't want this change.
During the building of a Vite project it replaces instances of the code 'process.env.NODE_ENV' with the literal '"production"' this causes a syntax error in the
isDev
function in lib/utils/index.js as it calls global.process.env.NODE_ENV. If this code were changed toglobal.process.env['NODE_ENV']
it would work with vite.The text was updated successfully, but these errors were encountered: