mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-08 23:26:43 +08:00
【银保app】增加页面打包插件压缩工具
This commit is contained in:
@@ -1,11 +1,18 @@
|
||||
const autoprefixer = require('autoprefixer')
|
||||
const pxtoviewport = require('postcss-px-to-viewport')
|
||||
const CompressionWebpackPlugin = require('compression-webpack-plugin');
|
||||
|
||||
module.exports = {
|
||||
publicPath: process.env.NODE_ENV === 'production' ? '/' : '/',
|
||||
lintOnSave: process.env.NODE_ENV === 'development', //是否开启代码检查
|
||||
outputDir: 'dist', //打包输出目录
|
||||
productionSourceMap: false,
|
||||
configureWebpack: config => {
|
||||
config.plugins.push(new CompressionWebpackPlugin({
|
||||
filename: '[path][name].gz',
|
||||
test: /\.(js|css)$/i
|
||||
}));
|
||||
},
|
||||
css: {
|
||||
loaderOptions: {
|
||||
postcss: {
|
||||
|
||||
Reference in New Issue
Block a user