densen2014 / ZXingBlazor

Using ZXing Scan barcode/QR code in blazor
Apache License 2.0
93 stars 39 forks source link

Import path of zxing.min.js is incorrect #34

Closed PeterLeeSAG closed 1 month ago

PeterLeeSAG commented 5 months ago

The import path is /_content/ZXingBlazor/lib/zxing/zxing.min.js originally in BarcodeReader.razor.js, but when I deploy my web app to the production server, it show the following error message: Failed to fetch dynamically imported module: https://[my web site]/[web application]/_content/ZXingBlazor/BarcodeReader.razor.js?v=1.1.4.0 TypeError: Failed to fetch dynamically imported module: https://[my web site]/[web application]/_content/ZXingBlazor/BarcodeReader.razor.js?v=1.1.4.0 When I update the path to ./lib/zxing/zxing.min.js, the error is gone.

densen2014 commented 5 months ago

Are you compiling from source code or using nuget package?

maybe ploblem is deploy with https://[my web site]/[web application] , I usually deploy it on a domain name, such as https://blazor.app1.es/barcodescanner, maybe i need do some test with https://[my web site]/[web application] format. thanks for your report

PeterLeeSAG commented 5 months ago

Thanks for your reply, I download the library via Nuget, and deployed the web app under a domain, it would be nice if this library can be used in multiple web app environment, please consider to add this support for this kind of situation, thanks a lot.