@@ -41,13 +41,13 @@ const outputConfigs = {
41
41
file : pkg . main ,
42
42
format : `cjs` ,
43
43
} ,
44
- global : {
45
- file : pkg . unpkg ,
44
+ ' global-vue-3' : {
45
+ file : pkg . unpkg . replace ( '2' , '3' ) ,
46
46
format : `iife` ,
47
47
} ,
48
- esm : {
49
- file : pkg . browser ,
50
- format : `es ` ,
48
+ 'global-vue-2' : {
49
+ file : pkg . unpkg ,
50
+ format : `iife ` ,
51
51
} ,
52
52
}
53
53
@@ -61,7 +61,7 @@ const packageConfigs = packageFormats.map((format) =>
61
61
packageFormats . forEach ( ( format ) => {
62
62
if ( format === 'cjs' ) {
63
63
packageConfigs . push ( createProductionConfig ( format ) )
64
- } else if ( format === 'global' ) {
64
+ } else if ( format . startsWith ( 'global' ) ) {
65
65
packageConfigs . push ( createMinifiedConfig ( format ) )
66
66
}
67
67
} )
@@ -77,10 +77,10 @@ function createConfig(format, output, plugins = []) {
77
77
output . sourcemap = ! ! process . env . SOURCE_MAP
78
78
output . banner = banner
79
79
output . externalLiveBindings = false
80
- output . globals = { vue : 'Vue ' }
80
+ output . globals = { ' vue-demi' : 'VueDemi ' }
81
81
82
82
const isProductionBuild = / \. p r o d \. j s $ / . test ( output . file )
83
- const isGlobalBuild = format === 'global'
83
+ const isGlobalBuild = format . startsWith ( 'global' )
84
84
const isRawESMBuild = format === 'esm'
85
85
const isNodeBuild = format === 'cjs'
86
86
const isBundlerESMBuild = / e s m - b u n d l e r / . test ( format )
@@ -107,7 +107,7 @@ function createConfig(format, output, plugins = []) {
107
107
// during a single build.
108
108
hasTSChecked = true
109
109
110
- const external = [ 'vue' ]
110
+ const external = [ 'vue-demi ' ]
111
111
112
112
const nodePlugins = [ resolve ( ) , commonjs ( ) ]
113
113
0 commit comments