@@ -52,16 +52,6 @@ const outputConfigs = {
5252 file : `dist/${ name } .esm-browser.js` ,
5353 format : `es`
5454 } ,
55- /*
56- 'esm-bundler': {
57- file: `dist/${name}.esm-bundler.mjs`,
58- format: `es`
59- },
60- 'esm-browser': {
61- file: `dist/${name}.esm-browser.mjs`,
62- format: `es`
63- },
64- */
6555 cjs : {
6656 // file: `dist/${name}.cjs.js`,
6757 file : `dist/${ name } .cjs` ,
@@ -76,20 +66,14 @@ const outputConfigs = {
7666 file : `dist/${ name } .runtime.mjs` ,
7767 format : `es`
7868 } ,
79- 'browser-runtime' : {
80- file : `dist/${ name } .runtime.esm-browser.js` ,
81- format : 'es'
82- } ,
83- /*
84- 'esm-bundler-runtime': {
85- file: `dist/${name}.runtime.esm-bundler.mjs`,
69+ 'mjs-node-runtime' : {
70+ file : `dist/${ name } .runtime.node.mjs` ,
8671 format : `es`
8772 } ,
88- 'esm- browser-runtime': {
89- file: `dist/${name}.runtime.esm-browser.mjs `,
73+ 'browser-runtime' : {
74+ file : `dist/${ name } .runtime.esm-browser.js ` ,
9075 format : 'es'
9176 } ,
92- */
9377 'global-runtime' : {
9478 file : `dist/${ name } .runtime.global.js` ,
9579 format : 'iife'
@@ -216,6 +200,7 @@ function createConfig(format, _output, plugins = []) {
216200 } ) ,
217201 tsPlugin ,
218202 createReplacePlugin (
203+ name ,
219204 isProductionBuild ,
220205 isBundlerESMBuild ,
221206 isBrowserESMBuild ,
@@ -243,6 +228,7 @@ function createConfig(format, _output, plugins = []) {
243228 await fs . writeFile ( resolve ( `dist/${ stub } ` ) , contents )
244229 console . log ( `created stub ${ pc . bold ( `dist/${ stub } ` ) } ` )
245230
231+ /*
246232 // add the node specific version
247233 if (format === 'mjs' || format === 'mjs-runtime') {
248234 // NOTE:
@@ -271,6 +257,7 @@ function createConfig(format, _output, plugins = []) {
271257 console.log(`created stub ${pc.bold(outfile)}`)
272258 }
273259 }
260+ */
274261 }
275262 }
276263 ] ,
@@ -287,6 +274,7 @@ function createConfig(format, _output, plugins = []) {
287274}
288275
289276function createReplacePlugin (
277+ name ,
290278 isProduction ,
291279 isBundlerESMBuild ,
292280 isBrowserESMBuild ,
@@ -300,11 +288,14 @@ function createReplacePlugin(
300288 const replacements = {
301289 __COMMIT__ : `"${ process . env . COMMIT } "` ,
302290 __VERSION__ : `'${ masterVersion } '` ,
303- __DEV__ : isBundlerESMBuild
304- ? // preserve to be handled by bundlers
305- `(process.env.NODE_ENV !== 'production')`
306- : // hard coded dev/prod builds
307- ! isProduction ,
291+ __DEV__ :
292+ [ 'vue-i18n' , 'petite-vue-i18n' ] . includes ( name ) && isNodeBuild
293+ ? 'false' // tree-shake devtools
294+ : isBundlerESMBuild
295+ ? // preserve to be handled by bundlers
296+ `(process.env.NODE_ENV !== 'production')`
297+ : // hard coded dev/prod builds
298+ ! isProduction ,
308299 // this is only used during Vue's internal tests
309300 __TEST__ : `false` ,
310301 // If the build is expected to run directly in the browser (global / esm builds)
@@ -327,9 +318,12 @@ function createReplacePlugin(
327318 __FEATURE_LEGACY_API__ : isBundlerESMBuild
328319 ? `__VUE_I18N_LEGACY_API__`
329320 : `true` ,
330- __FEATURE_PROD_VUE_DEVTOOLS__ : isBundlerESMBuild
331- ? `__VUE_PROD_DEVTOOLS__`
332- : `false` ,
321+ __FEATURE_PROD_VUE_DEVTOOLS__ :
322+ [ 'vue-i18n' , 'petite-vue-i18n' ] . includes ( name ) && isNodeBuild
323+ ? 'false' // tree-shake devtools
324+ : isBundlerESMBuild
325+ ? `__VUE_PROD_DEVTOOLS__`
326+ : `false` ,
333327 __FEATURE_PROD_INTLIFY_DEVTOOLS__ : isBundlerESMBuild
334328 ? `__INTLIFY_PROD_DEVTOOLS__`
335329 : `false` ,
0 commit comments