@@ -122,7 +122,7 @@ function createConfig(format, output, plugins = []) {
122122 const isBundlerESMBuild = / e s m - b u n d l e r / . test ( format )
123123 const isBrowserESMBuild = / e s m - b r o w s e r / . test ( format )
124124 const isServerRenderer = name === 'server-renderer'
125- const isNodeBuild = format === 'cjs'
125+ const isCJSBuild = format === 'cjs'
126126 const isGlobalBuild = / g l o b a l / . test ( format )
127127 const isCompatPackage =
128128 pkg . name === '@vue/compat' || pkg . name === '@vue/compat-canary'
@@ -138,7 +138,7 @@ function createConfig(format, output, plugins = []) {
138138**/`
139139
140140 output . exports = isCompatPackage ? 'auto' : 'named'
141- if ( isNodeBuild ) {
141+ if ( isCJSBuild ) {
142142 output . esModule = true
143143 }
144144 output . sourcemap = ! ! process . env . SOURCE_MAP
@@ -172,9 +172,9 @@ function createConfig(format, output, plugins = []) {
172172 __ESM_BUNDLER__ : String ( isBundlerESMBuild ) ,
173173 __ESM_BROWSER__ : String ( isBrowserESMBuild ) ,
174174 // is targeting Node (SSR)?
175- __NODE_JS__ : String ( isNodeBuild ) ,
175+ __CJS__ : String ( isCJSBuild ) ,
176176 // need SSR-specific branches?
177- __SSR__ : String ( isNodeBuild || isBundlerESMBuild || isServerRenderer ) ,
177+ __SSR__ : String ( isCJSBuild || isBundlerESMBuild || isServerRenderer ) ,
178178
179179 // 2.x compat build
180180 __COMPAT__ : String ( isCompatBuild ) ,
@@ -329,7 +329,7 @@ function createConfig(format, output, plugins = []) {
329329 tsconfig : path . resolve ( __dirname , 'tsconfig.json' ) ,
330330 sourceMap : output . sourcemap ,
331331 minify : false ,
332- target : isServerRenderer || isNodeBuild ? 'es2019' : 'es2015' ,
332+ target : isServerRenderer || isCJSBuild ? 'es2019' : 'es2015' ,
333333 define : resolveDefine ( ) ,
334334 } ) ,
335335 ...resolveNodePlugins ( ) ,
0 commit comments