@@ -44,6 +44,10 @@ const outputConfigs = {
44
44
file : `dist/${ name } .mjs` ,
45
45
format : `es`
46
46
} ,
47
+ 'mjs-node' : {
48
+ file : `dist/${ name } .node.mjs` ,
49
+ format : `es`
50
+ } ,
47
51
browser : {
48
52
file : `dist/${ name } .esm-browser.js` ,
49
53
format : `es`
@@ -326,39 +330,38 @@ function createReplacePlugin(
326
330
: // hard coded dev/prod builds
327
331
! isProduction ,
328
332
// this is only used during Vue's internal tests
329
- __TEST__ : false ,
333
+ __TEST__ : ` false` ,
330
334
// If the build is expected to run directly in the browser (global / esm builds)
331
- __BROWSER__ : isBrowserBuild ,
332
- __GLOBAL__ : isGlobalBuild ,
335
+ __BROWSER__ : String ( isBrowserBuild ) ,
336
+ __GLOBAL__ : String ( isGlobalBuild ) ,
333
337
// for runtime only
334
- __RUNTIME__ : isRuntimeOnlyBuild ,
338
+ __RUNTIME__ : String ( isRuntimeOnlyBuild ) ,
335
339
// bundle filename
336
340
__BUNDLE_FILENAME__ : `'${ bundleFilename } '` ,
337
- __ESM_BUNDLER__ : isBundlerESMBuild ,
338
- __ESM_BROWSER__ : isBrowserESMBuild ,
341
+ __ESM_BUNDLER__ : String ( isBundlerESMBuild ) ,
342
+ __ESM_BROWSER__ : String ( isBrowserESMBuild ) ,
339
343
// is targeting Node (SSR)?
340
- __NODE_JS__ : isNodeBuild ,
344
+ __NODE_JS__ : String ( isNodeBuild ) ,
341
345
// for lite version
342
- __LITE__ : isLite ,
346
+ __LITE__ : String ( isLite ) ,
343
347
// for bridge version
344
- __BRIDGE__ : isBridge ,
348
+ __BRIDGE__ : String ( isBridge ) ,
345
349
// feature flags
346
350
__FEATURE_FULL_INSTALL__ : isBundlerESMBuild
347
351
? `__VUE_I18N_FULL_INSTALL__`
348
- : true ,
352
+ : ` true` ,
349
353
__FEATURE_LEGACY_API__ : isBundlerESMBuild
350
354
? `__VUE_I18N_LEGACY_API__`
351
- : true ,
355
+ : ` true` ,
352
356
__FEATURE_PROD_VUE_DEVTOOLS__ : isBundlerESMBuild
353
357
? `__VUE_PROD_DEVTOOLS__`
354
- : false ,
358
+ : ` false` ,
355
359
__FEATURE_PROD_INTLIFY_DEVTOOLS__ : isBundlerESMBuild
356
360
? `__INTLIFY_PROD_DEVTOOLS__`
357
- : false ,
361
+ : ` false` ,
358
362
__FEATURE_JIT_COMPILATION__ : isBundlerESMBuild
359
363
? `__INTLIFY_JIT_COMPILATION__`
360
- : false ,
361
- preventAssignment : false ,
364
+ : `false` ,
362
365
...( isProduction && isBrowserBuild
363
366
? {
364
367
'emitError(' : `/*#__PURE__*/ emitError(` ,
@@ -375,7 +378,7 @@ function createReplacePlugin(
375
378
replacements [ key ] = process . env [ key ]
376
379
}
377
380
} )
378
- return replace ( replacements )
381
+ return replace ( { values : replacements , preventAssignment : true } )
379
382
}
380
383
381
384
function createProductionConfig ( format ) {
0 commit comments