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

@ -46,16 +46,5 @@ import "./tristate_checkboxes";
//Define jquery globally
window.$ = window.jQuery = require("jquery");
//Use the local WASM file for the ZXing library
import {
setZXingModuleOverrides,
} from "barcode-detector/ponyfill";
import wasmFile from "../../node_modules/zxing-wasm/dist/reader/zxing_reader.wasm";
setZXingModuleOverrides({
locateFile: (path, prefix) => {
if (path.endsWith(".wasm")) {
return wasmFile;
}
return prefix + path;
},
});
//ZXing WASM configuration now loaded only when barcode scanner is used
// This improves app startup time significantly