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 = {
39
39
resolveLoader : {
40
40
modules
41
41
} ,
42
+ externals : config . build . externals ,
42
43
module : {
43
44
rules : [
44
45
{
Original file line number Diff line number Diff line change @@ -101,6 +101,7 @@ function mergeArgvConfig (config) {
101
101
output : argvOutput , // pathString, undefined
102
102
config : argvCnf , // pathString, undefined
103
103
definePlugin : argvDefinePlugin , // object, undefined
104
+ externals : argvExternals , // object, undefined
104
105
...resetConfig
105
106
} = argv
106
107
const mpType = argvComponent ? 'component' : 'page'
@@ -142,6 +143,11 @@ function mergeArgvConfig (config) {
142
143
const assetsRoot = path . resolve ( outputPath )
143
144
defConfig . assetsRoot = assetsRoot
144
145
}
146
+
147
+ // 外部扩展
148
+ if ( argvExternals && typeof argvExternals === 'object' ) {
149
+ defConfig . externals = argvExternals
150
+ }
145
151
146
152
const allEntry = Object . keys ( defConfig . entry )
147
153
You can’t perform that action at this time.
0 commit comments