mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-20 17:15:51 +02:00
Only do asset compression im production mode.
This improves speed in watch mode.
This commit is contained in:
parent
47702d6131
commit
059bb99f87
1 changed files with 14 additions and 12 deletions
|
@ -108,7 +108,13 @@ Encore
|
|||
}
|
||||
]))
|
||||
|
||||
.addPlugin(new CompressionPlugin({
|
||||
// uncomment if you use API Platform Admin (composer req api-admin)
|
||||
//.enableReactPreset()
|
||||
//.addEntry('admin', './assets/js/admin.js')
|
||||
;
|
||||
|
||||
if (Encore.isProduction()) {
|
||||
Encore.addPlugin(new CompressionPlugin({
|
||||
filename: '[path].br[query]',
|
||||
algorithm: 'brotliCompress',
|
||||
test: /\.(js|css|html|svg)$/,
|
||||
|
@ -121,16 +127,12 @@ Encore
|
|||
deleteOriginalAssets: false,
|
||||
}))
|
||||
|
||||
.addPlugin(new CompressionPlugin({
|
||||
filename: '[path].gz[query]',
|
||||
algorithm: 'gzip',
|
||||
test: /\.(js|css|html|svg)$/,
|
||||
deleteOriginalAssets: false,
|
||||
}))
|
||||
|
||||
// uncomment if you use API Platform Admin (composer req api-admin)
|
||||
//.enableReactPreset()
|
||||
//.addEntry('admin', './assets/js/admin.js')
|
||||
;
|
||||
.addPlugin(new CompressionPlugin({
|
||||
filename: '[path].gz[query]',
|
||||
algorithm: 'gzip',
|
||||
test: /\.(js|css|html|svg)$/,
|
||||
deleteOriginalAssets: false,
|
||||
}))
|
||||
}
|
||||
|
||||
module.exports = Encore.getWebpackConfig();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue