File tree 1 file changed +12
-10
lines changed
1 file changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -50,8 +50,9 @@ const vueConfig = {
50
50
BUILD_DATE : buildDate
51
51
} )
52
52
] ,
53
- // if prod, add externals
54
- externals : isProd ? assetsCDN . externals : { }
53
+ // en_US: `if prod, add externals`
54
+ // zh_CN: `这里是用来控制编译忽略外部依赖的,与 config.plugin('html') 配合可以编译时引入外部CDN文件依赖`
55
+ // externals: isProd ? assetsCDN.externals : {}
55
56
} ,
56
57
57
58
chainWebpack : config => {
@@ -74,14 +75,15 @@ const vueConfig = {
74
75
esModule : false
75
76
} )
76
77
77
- // if prod is on
78
- // assets require on cdn
79
- if ( isProd ) {
80
- config . plugin ( 'html' ) . tap ( args => {
81
- args [ 0 ] . cdn = assetsCDN
82
- return args
83
- } )
84
- }
78
+ // en_US: If prod is on assets require on cdn
79
+ // zh_CN: 如果是 prod 模式,则引入 CDN 依赖文件,有需要减少包大小请自行解除依赖
80
+ //
81
+ // if (isProd) {
82
+ // config.plugin('html').tap(args => {
83
+ // args[0].cdn = assetsCDN
84
+ // return args
85
+ // })
86
+ // }
85
87
} ,
86
88
87
89
css : {
You can’t perform that action at this time.
0 commit comments