mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-21 01:25:55 +02:00
Use zxing-wasm polyfill even if native barcode detector API is available as the polyfill is sometimes better than the native on
See discussion #808 for more infos
This commit is contained in:
parent
6bdf3d891a
commit
614697ba84
3 changed files with 11 additions and 12 deletions
|
@ -51,7 +51,6 @@ import {
|
|||
setZXingModuleOverrides,
|
||||
} from "barcode-detector/pure";
|
||||
import wasmFile from "../../node_modules/zxing-wasm/dist/reader/zxing_reader.wasm";
|
||||
|
||||
setZXingModuleOverrides({
|
||||
locateFile: (path, prefix) => {
|
||||
if (path.endsWith(".wasm")) {
|
||||
|
@ -59,6 +58,4 @@ setZXingModuleOverrides({
|
|||
}
|
||||
return prefix + path;
|
||||
},
|
||||
});
|
||||
//Enable polyfill for the barcode detector. The WASM triggering is done when the barcode detector is used
|
||||
import "barcode-detector/side-effects";
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue