Polyfill BarcodeDetector API for improved performance of Html5QRcodeScanner

This commit is contained in:
Jan Böhmer 2025-01-04 16:49:17 +01:00
parent 9e85b70c17
commit 4b09a321ad
4 changed files with 54 additions and 1 deletions

View file

@ -59,6 +59,12 @@ Encore
.addEntry('app', './assets/js/app.js')
.addEntry('webauthn_tfa', './assets/js/webauthn_tfa.js')
//Configure to just output the zxing wasm file, without parsing it
.addRule({
test: /zxing_reader\.wasm$/,
type: "asset/resource"
})
//.addEntry('page1', './assets/js/page1.js')
//.addEntry('page2', './assets/js/page2.js')
@ -189,6 +195,10 @@ if (Encore.isDev()) {
module.exports = Encore.getWebpackConfig();
//Enable webassembly support
module.exports.experiments = module.exports.experiments || {};
module.exports.experiments.asyncWebAssembly = true;
//Enable webpack auto public path (this only works in combination with WebpackAutoPathSubscriber!!)
//We do it here to supress a warning caused by webpack Encore
module.exports.output.publicPath = 'auto';