File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,6 @@ const webpack = require('webpack')
12
12
const webpackConfig = require ( path . join ( process . cwd ( ) , 'webpack.config' ) )
13
13
// handle Webpack output object and plugins
14
14
const webpackOutput = { ...webpackConfig . output }
15
- const webpackPlugins = ( webpackConfig . plugins && webpackConfig . plugins . concat ( ) ) || [ ]
16
15
17
16
const fatalError = err => {
18
17
if ( err ) {
@@ -39,22 +38,18 @@ const webpackConfigList = []
39
38
}
40
39
}
41
40
42
- // setup Webpack plugins by output type
41
+ // edit Webpack config by output type
43
42
switch ( outputType ) {
44
43
case '.bundle' :
45
44
// dependencies and polyfills
46
45
break
47
46
case '.polyfill' :
48
47
// lib and polyfills
49
- config . plugins = webpackPlugins . concat ( [
50
- new webpack . IgnorePlugin ( / ( @ e c o m p l u s \/ u t i l s | a x i o s ) / )
51
- ] )
48
+ config . externals = / ^ ( @ e c o m p l u s \/ u t i l s | a x i o s ) / i
52
49
break
53
50
default :
54
51
// standalone lib output
55
- config . plugins = webpackPlugins . concat ( [
56
- new webpack . IgnorePlugin ( / ( @ b a b e l \/ r u n t i m e | @ e c o m p l u s \/ u t i l s | a x i o s | c o r e - j s ) / )
57
- ] )
52
+ config . externals = / ^ ( @ b a b e l \/ r u n t i m e | @ e c o m p l u s \/ u t i l s | a x i o s | c o r e - j s ) / i
58
53
}
59
54
webpackConfigList . push ( config )
60
55
} )
You can’t perform that action at this time.
0 commit comments