@@ -145,19 +145,19 @@ function createReplacePlugin(
145
145
? // preserve to be handled by bundlers
146
146
`(process.env.NODE_ENV !== 'production')`
147
147
: // hard coded dev/prod builds
148
- ! isProduction ,
148
+ JSON . stringify ( ! isProduction ) ,
149
149
// this is only used during tests
150
- __TEST__ : isBundlerESMBuild ? `(process.env.NODE_ENV === 'test')` : false ,
150
+ __TEST__ : isBundlerESMBuild ? `(process.env.NODE_ENV === 'test')` : ' false' ,
151
151
// If the build is expected to run directly in the browser (global / esm builds)
152
152
__BROWSER__ : isBrowserBuild ,
153
153
__FEATURE_PROD_DEVTOOLS__ : isBundlerESMBuild
154
154
? `__VUE_PROD_DEVTOOLS__`
155
- : false ,
155
+ : ' false' ,
156
156
// is targeting bundlers?
157
- __BUNDLER__ : isBundlerESMBuild ,
158
- __GLOBAL__ : isGlobalBuild ,
157
+ __BUNDLER__ : JSON . stringify ( isBundlerESMBuild ) ,
158
+ __GLOBAL__ : JSON . stringify ( isGlobalBuild ) ,
159
159
// is targeting Node (SSR)?
160
- __NODE_JS__ : isNodeBuild ,
160
+ __NODE_JS__ : JSON . stringify ( isNodeBuild ) ,
161
161
}
162
162
// allow inline overrides like
163
163
//__RUNTIME_COMPILE__=true yarn build
@@ -166,7 +166,11 @@ function createReplacePlugin(
166
166
replacements [ key ] = process . env [ key ]
167
167
}
168
168
} )
169
- return replace ( replacements )
169
+ // TODO: fix replacement thing
170
+ return replace ( {
171
+ preventAssignment : true ,
172
+ values : replacements ,
173
+ } )
170
174
}
171
175
172
176
function createProductionConfig ( format ) {
0 commit comments