undecaf / barcode-detector-polyfill

A WebAssembly polyfill for the Barcode Detection API
MIT License
118 stars 14 forks source link

Use offline #9

Closed Levminer closed 1 year ago

Levminer commented 1 year ago

Hi!

I want to use this package offline, but it depends on the jsdeliver link.

I'm using esbuild, tried using this config to load it from the local node_modules (https://github.com/undecaf/barcode-detector-polyfill/blob/master/example/esbuild.config.js), (installed https://github.com/undecaf/zbar-wasm#readme). But I couldn't get it to work.

Thanks for the help!

undecaf commented 1 year ago

Branch zbar-bundled in this repository now demonstrates how to bundle @undecaf/zbar-wasm statically. This will enable you to use that package offline.

Please note that I am unsure whether this complies with the LGPL licenses that are involved.

Levminer commented 1 year ago

Thanks! It works. My app is licensed under GPL-3.0, so the licensing issue doesn't concern me.