File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ module.exports = {
3939 resolveLoader : {
4040 modules
4141 } ,
42+ externals : config . build . externals ,
4243 module : {
4344 rules : [
4445 {
Original file line number Diff line number Diff line change @@ -101,6 +101,7 @@ function mergeArgvConfig (config) {
101101 output : argvOutput , // pathString, undefined
102102 config : argvCnf , // pathString, undefined
103103 definePlugin : argvDefinePlugin , // object, undefined
104+ externals : argvExternals , // object, undefined
104105 ...resetConfig
105106 } = argv
106107 const mpType = argvComponent ? 'component' : 'page'
@@ -142,6 +143,11 @@ function mergeArgvConfig (config) {
142143 const assetsRoot = path . resolve ( outputPath )
143144 defConfig . assetsRoot = assetsRoot
144145 }
146+
147+ // 外部扩展
148+ if ( argvExternals && typeof argvExternals === 'object' ) {
149+ defConfig . externals = argvExternals
150+ }
145151
146152 const allEntry = Object . keys ( defConfig . entry )
147153
You can’t perform that action at this time.
0 commit comments