[ui-shared-deps] only compress in production build mode (#65151)
This commit is contained in:
parent
09deb23b7c
commit
99aed58fe2
|
@ -118,15 +118,19 @@ exports.getWebpackConfig = ({ dev = false } = {}) => ({
|
|||
new webpack.DefinePlugin({
|
||||
'process.env.NODE_ENV': dev ? '"development"' : '"production"',
|
||||
}),
|
||||
new CompressionPlugin({
|
||||
algorithm: 'brotliCompress',
|
||||
filename: '[path].br',
|
||||
test: /\.(js|css)$/,
|
||||
}),
|
||||
new CompressionPlugin({
|
||||
algorithm: 'gzip',
|
||||
filename: '[path].gz',
|
||||
test: /\.(js|css)$/,
|
||||
}),
|
||||
...(dev
|
||||
? []
|
||||
: [
|
||||
new CompressionPlugin({
|
||||
algorithm: 'brotliCompress',
|
||||
filename: '[path].br',
|
||||
test: /\.(js|css)$/,
|
||||
}),
|
||||
new CompressionPlugin({
|
||||
algorithm: 'gzip',
|
||||
filename: '[path].gz',
|
||||
test: /\.(js|css)$/,
|
||||
}),
|
||||
]),
|
||||
],
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue