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

JS Components don't run in Release

Open davesimtech opened this issue 11 months ago • 1 comments

I have an application that uses collocated JS discovery, everything works fine while developing and running the application locally, however when publishing to release and deploying none of the collocated files appear to run.

I've inspected the source through chrome and compared locally and in the release version, both appear identical and I can see the bl-script tag with the right razor.js file - which also loads when I navigate to it in the browser.

Looking at the networking it appears the following two files aren't being loaded in production:

image

Any help would be much appreciated, thanks!

davesimtech avatar Jan 05 '25 09:01 davesimtech

Thanks for the issue report, @davesimtech.

The BlazorJSComponents.[fingerprint].lib.module.js file is a JS initializer module, so it should be getting loaded by the framework. Not sure why it's getting skipped in production.

I just tried to repro this on a new project (dotnet new blazor -int Server), but the published app worked fine. Could you please provide more information about what kind of app this is? Or if you're able to give a minimal repro, that would be awesome. Thanks!

MackinnonBuck avatar Jan 15 '25 19:01 MackinnonBuck