|
|
@@ -4,7 +4,7 @@ var ExtractTextPlugin = require('extract-text-webpack-plugin');
|
|
|
|
|
|
module.exports = {
|
|
|
entry: {
|
|
|
- 'fetch/whatwg-fetch': 'whatwg-fetch',
|
|
|
+ 'src/whatwg-fetch': 'whatwg-fetch',
|
|
|
'src/main': './app/main.js',
|
|
|
'src/title': './app/src/Title/Title.jsx',
|
|
|
'src/table': './app/component/Table.jsx',
|
|
|
@@ -12,7 +12,7 @@ module.exports = {
|
|
|
'src/chart': './app/src/Charts/ECharts.js'
|
|
|
},
|
|
|
externals: {
|
|
|
- echarts: 'window.echarts',
|
|
|
+ echarts: 'window.echarts'
|
|
|
},
|
|
|
output: {
|
|
|
path: path.resolve(__dirname, './build'),
|
|
|
@@ -75,6 +75,11 @@ module.exports = {
|
|
|
return getPath('css/[name].css').replace('src/', '').replace('css/js', 'css');
|
|
|
},
|
|
|
allChunks: true
|
|
|
- })
|
|
|
+ }),
|
|
|
+ new webpack.optimize.CommonsChunkPlugin({
|
|
|
+ names: 'commons',
|
|
|
+ filename: '[name].bundle.js',
|
|
|
+ minChunks: 4,
|
|
|
+ }),
|
|
|
]
|
|
|
};
|