|
@@ -4,10 +4,20 @@ const school = path.resolve(__dirname, '../train-school');
|
|
|
module.exports = {
|
|
|
publicPath: process.env.NODE_ENV === 'development' ? '/' : '/center',
|
|
|
outputDir: 'center',
|
|
|
+ productionSourceMap: false,
|
|
|
+ chainWebpack: config => {
|
|
|
+ if (process.env.NODE_ENV === 'production') {
|
|
|
+ config
|
|
|
+ .plugin('webpack-bundle-analyzer')
|
|
|
+ .use(require('webpack-bundle-analyzer').BundleAnalyzerPlugin)
|
|
|
+ .end();
|
|
|
+ config.plugins.delete('prefetch');
|
|
|
+ }
|
|
|
+ },
|
|
|
configureWebpack: {
|
|
|
// externals: {
|
|
|
- // 'element-ui': 'Element',
|
|
|
- // vue: 'Vue',
|
|
|
+ // // 'element-ui': 'Element',
|
|
|
+ // // vue: 'Vue',
|
|
|
// },
|
|
|
// 开发生产共同配置
|
|
|
resolve: {
|