Add compress to common

This commit is contained in:
Paulo Gustavo Veiga 2021-02-16 11:14:04 -08:00
parent e698d84f9c
commit 837802acda
2 changed files with 18 additions and 3 deletions

View File

@ -63,7 +63,6 @@ module.exports = {
] ]
} }
}] }]
}), })
new CompressionPlugin()
] ]
} }

View File

@ -6,5 +6,21 @@ module.exports = merge(common, {
mode: 'production', mode: 'production',
devtool: 'source-map', devtool: 'source-map',
optimization: { optimization: {
minimize: true } minimize: true
},
plugins: [
new CleanWebpackPlugin(),
new CopyWebpackPlugin({
patterns: [{
from: 'public/*',
to: '[name].[ext]',
globOptions: {
ignore: [
'**/index.html'
]
}
}]
}),
new CompressionPlugin()
]
}); });