blazor-js-components icon indicating copy to clipboard operation
blazor-js-components copied to clipboard

Support for relative URLs

Open samanson123 opened this issue 1 year ago • 0 comments

The package doesn't seem to be work with applications that require relative URLs.

For example, I intend to host my application as an IIS web application meaning it won't be hosted under the root DNS. The BlazorJSComponents.lib.module.js file imports from '/_content/BlazorJSComponents/component.mjs' which causes a 404 error.

Tried running under .NET 9, Blazor static SSR hosted on IIS.

I've had to do a bit of hacky fix in the meantime where I generate the default import map as a string using HtmlRenderer and then replace the existing map which uses ./ at the start (the default it expects) to / as is in the JavaScript file and then map back to ./

samanson123 avatar Feb 27 '25 12:02 samanson123