samsam2310 / zbar.wasm

A wasm build of C/C++ ZBar barcode scanning library.
GNU Lesser General Public License v2.1
222 stars 30 forks source link

Fix browser loader #14

Closed samsam2310 closed 2 years ago

samsam2310 commented 2 years ago

Fix browser loader script. Use import instead of require. Function locateFile is used to override the wasm binary path. With that we can let webpack to serve the file for us.

TEST=Build and check with the demo page.

codecov-commenter commented 2 years ago

Codecov Report

Merging #14 (9ae8c50) into master (0539a12) will decrease coverage by 0.01%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #14      +/-   ##
==========================================
- Coverage   99.12%   99.10%   -0.02%     
==========================================
  Files          10        9       -1     
  Lines         229      224       -5     
  Branches       15       15              
==========================================
- Hits          227      222       -5     
  Misses          2        2              
Impacted Files Coverage Δ
src/instance.ts 88.88% <100.00%> (-1.12%) :arrow_down:
src/load.ts 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 0539a12...9ae8c50. Read the comment docs.