Description
As on other libraries the location of the javascript has impact on what is the latest version used and cached by the browser.
When using multiple Blazor WASM applications under different subfolders, from the one asp.net site the "base path" on the index.html file has a path like:
<base href="/inventory/">
As the original code has a fixed path: './_content/KristofferStrube.Blazor.FileAPI/KristofferStrube.Blazor.FileAPI.js'
, the "." (dot) on the path makes the browser look for the file in the current folder, but as the project is compiled all the referenced Razor Libraries are located under the root folder, and the browser won't locate it.
In cases when the applications are separated in different virtual folders those files would be duplicated on the various Blazor WASM applications and it would work, and may be usefull when different versions of the files are used based on the nuget's version. But currently on resource limits, IIS and it's ISAPI wrapper for .NET Core+, on a shared hosting it's limiting how many sites can be supportedm and I have 7 WASM apps.
There are different ways of solving this, but applications share functionality from different modules, it's an ERP, so it has multiple dependencies and pushing updates to one module, might and will impact on various Blazor WASM apps and REST APIs, may be complex CI/CD would help on pushing everything and switching App Service slots at once, so we consider it as a workaround for the current stage.
When fully launched I will move shared resources paths to a CDN so that all icons, fonts, css and other resources are fully shared by all the apps, to improve performance an reliability and storage costs. Your libraries reduce my complexity of handling a cache case on OPFS of certain user data that shouldn't change frequently but is required when any app loads, but my target is using a CDN for the static content, even if it's pulled in the background from another site, but allowing to granularly tweek caching of responses.
I've made none braking changes for this in the Pull Request #3