When my js is in a razor class library and my page is called "View" and it's in a folder "Pages" this is what I use:
await JSHost.ImportAsync(nameof(View), $"/_content/{GetType().Assembly.GetName().Name}/Pages/{nameof(View)}.razor.js");