diff options
Diffstat (limited to 'src/jsqr-global.js')
| -rw-r--r-- | src/jsqr-global.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/jsqr-global.js b/src/jsqr-global.js new file mode 100644 index 0000000..5450160 --- /dev/null +++ b/src/jsqr-global.js @@ -0,0 +1,7 @@ +// Standalone bundle for the QR decoder, emitted as a separate dist/jsqr.js and +// loaded on demand by scan.js — only when a browser lacks the native +// BarcodeDetector API and the user actually opens the scanner. Keeps jsQR +// (~130 KB) out of the main single-file bundle and off the initial load. +import jsQR from 'jsqr'; + +window.jsQR = jsQR; |
