@@ -41,13 +41,13 @@ const outputConfigs = {
4141 file : pkg . main ,
4242 format : `cjs` ,
4343 } ,
44- global : {
45- file : pkg . unpkg ,
44+ ' global-vue-3' : {
45+ file : pkg . unpkg . replace ( '2' , '3' ) ,
4646 format : `iife` ,
4747 } ,
48- esm : {
49- file : pkg . browser ,
50- format : `es ` ,
48+ 'global-vue-2' : {
49+ file : pkg . unpkg ,
50+ format : `iife ` ,
5151 } ,
5252}
5353
@@ -61,7 +61,7 @@ const packageConfigs = packageFormats.map((format) =>
6161packageFormats . forEach ( ( format ) => {
6262 if ( format === 'cjs' ) {
6363 packageConfigs . push ( createProductionConfig ( format ) )
64- } else if ( format === 'global' ) {
64+ } else if ( format . startsWith ( 'global' ) ) {
6565 packageConfigs . push ( createMinifiedConfig ( format ) )
6666 }
6767} )
@@ -77,10 +77,10 @@ function createConfig(format, output, plugins = []) {
7777 output . sourcemap = ! ! process . env . SOURCE_MAP
7878 output . banner = banner
7979 output . externalLiveBindings = false
80- output . globals = { vue : 'Vue ' }
80+ output . globals = { ' vue-demi' : 'VueDemi ' }
8181
8282 const isProductionBuild = / \. p r o d \. j s $ / . test ( output . file )
83- const isGlobalBuild = format === 'global'
83+ const isGlobalBuild = format . startsWith ( 'global' )
8484 const isRawESMBuild = format === 'esm'
8585 const isNodeBuild = format === 'cjs'
8686 const isBundlerESMBuild = / e s m - b u n d l e r / . test ( format )
@@ -107,7 +107,7 @@ function createConfig(format, output, plugins = []) {
107107 // during a single build.
108108 hasTSChecked = true
109109
110- const external = [ 'vue' ]
110+ const external = [ 'vue-demi ' ]
111111
112112 const nodePlugins = [ resolve ( ) , commonjs ( ) ]
113113
0 commit comments