You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
623 B
25 lines
623 B
const CompressionWebpackPlugin = require('compression-webpack-plugin');
|
|
|
|
module.exports = {
|
|
productionSourceMap: false,
|
|
transpileDependencies: ['element-ui', 'ele-admin'],
|
|
chainWebpack: config => {
|
|
config.plugins.delete('prefetch');
|
|
if (process.env.NODE_ENV !== 'development') {
|
|
// 对超过10kb的文件gzip压缩
|
|
config.plugin('compressionPlugin').use(new CompressionWebpackPlugin({
|
|
test: /\.(js|css|html)$/,
|
|
threshold: 10240
|
|
}));
|
|
}
|
|
},
|
|
css: {
|
|
loaderOptions: {
|
|
sass: {
|
|
sassOptions: {
|
|
outputStyle: 'expanded'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|