File tree Expand file tree Collapse file tree 1 file changed +12
-10
lines changed Expand file tree Collapse file tree 1 file changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -50,8 +50,9 @@ const vueConfig = {
5050 BUILD_DATE : buildDate
5151 } )
5252 ] ,
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 : {}
5556 } ,
5657
5758 chainWebpack : config => {
@@ -74,14 +75,15 @@ const vueConfig = {
7475 esModule : false
7576 } )
7677
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+ // }
8587 } ,
8688
8789 css : {
You can’t perform that action at this time.
0 commit comments