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')
1212const webpackConfig = require ( path . join ( process . cwd ( ) , 'webpack.config' ) )
1313// handle Webpack output object and plugins
1414const webpackOutput = { ...webpackConfig . output }
15- const webpackPlugins = ( webpackConfig . plugins && webpackConfig . plugins . concat ( ) ) || [ ]
1615
1716const fatalError = err => {
1817 if ( err ) {
@@ -39,22 +38,18 @@ const webpackConfigList = []
3938 }
4039 }
4140
42- // setup Webpack plugins by output type
41+ // edit Webpack config by output type
4342 switch ( outputType ) {
4443 case '.bundle' :
4544 // dependencies and polyfills
4645 break
4746 case '.polyfill' :
4847 // 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
5249 break
5350 default :
5451 // 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
5853 }
5954 webpackConfigList . push ( config )
6055} )
You can’t perform that action at this time.
0 commit comments