Is there any way to manipulate the content of the files in a deployed Blazor app (_content folder specifically)

1 week ago 5
ARTICLE AD BOX

I'm using this barcode scanner from XZingBlazor and installed the nuget package onto my Blazor project. Everything works fine locally but when I deploy it the pathbase is /appName.

So when the nuget package looks for a helper js-file, it looks for path 0.0.0.0/_content/XZingBlazor/lib/xzing/xzing.min.js and throws a

https://0.0.0.0/_content/ZXingBlazor/lib/zxing/zxing.min.js net::ERR_ABORTED 404 (Not Found)

instead of 0.0.0.0/appName/_content/XZingBlazor/lib/xzing/xzing.min.js because the BarcodeReader.razor.js file (from XZingBlazor) imports the zxing.min.js like so:

import '/_content/ZXingBlazor/lib/zxing/zxing.min.js';

When (I think for it to work) it should import it like this:

import '_content/ZXingBlazor/lib/zxing/zxing.min.js';

I feel like the solution shouldn't be that difficult but it might be a lack of experience.

Read Entire Article