Closed maraf closed 4 months ago
A green dinosaur π¦ will be along shortly to assist. Stand-by ........
Hello @maraf ... I'll get this fixed up as soon as possible, but it will take a couple of weeks to reach it due to a high priority tutorial that I'm working on.
Description
The documentation currently states
It's not entirely true based on other file collocation that works in RCL.
JSHost.ImportAsync
always loads files relative towwwroot/_framework
directory. Examples for paths forJSHost.ImportAsync
:wwwroot/MyModule.js
, then relative path can be../MyModule.js
MyLibrary
inwwwroot/MyLibraryModule.js
, then relative path can be../_content/MyLibrary/MyLibraryModule.js
(this is true for both cases when the import is done from RLC itself or from the Blazor app) Note: absolute paths could be used as well, but then it could cause problems when the site is not hosted in the root of the domain.Based on feedback from https://github.com/dotnet/aspnetcore/issues/55817
Page URL
https://learn.microsoft.com/en-us/aspnet/core/blazor/javascript-interoperability/import-export-interop?view=aspnetcore-8.0
Content source URL
https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/blazor/javascript-interoperability/import-export-interop.md
Document ID
8aab92a0-c05f-ef01-fb74-a0bf525aae69
Article author
@guardrex