Optimize z-related components: Bundle analyzer, Brotli compression, ZXing lazy loading

Co-authored-by: jbtronics <5410681+jbtronics@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2025-09-21 14:12:32 +00:00
parent cb26e6d181
commit 130b08090a
4 changed files with 45 additions and 16 deletions

View file

@ -175,7 +175,7 @@ if (Encore.isProduction()) {
test: /\.(js|css|html|svg)$/,
compressionOptions: {
// zlibs `level` option matches Brotlis `BROTLI_PARAM_QUALITY` option.
level: 11,
level: 6,
},
//threshold: 10240,
minRatio: 0.8,
@ -190,9 +190,9 @@ if (Encore.isProduction()) {
}))
}
if (Encore.isDev()) {
if (Encore.isDev() && !process.env.CI) {
//Only uncomment if needed, as this cause problems with Github actions (job does not finish)
Encore.addPlugin(new BundleAnalyzerPlugin());
//Encore.addPlugin(new BundleAnalyzerPlugin());
}