Allow blazor-boot script to be served from apps not hosted at domain root
This commit is contained in:
parent
796d915526
commit
58af3e1638
|
|
@ -147,7 +147,7 @@ namespace Microsoft.AspNetCore.Blazor.Build.Core.FileSystem
|
|||
|
||||
var attributesDict = attributes.ToDictionary(x => x.Key, x => x.Value);
|
||||
attributesDict.Remove("type");
|
||||
attributesDict["src"] = "/_framework/blazor.js";
|
||||
attributesDict["src"] = "_framework/blazor.js";
|
||||
attributesDict["main"] = assemblyNameWithExtension;
|
||||
attributesDict["entrypoint"] = assemblyEntryPoint;
|
||||
attributesDict["references"] = referencesAttribute;
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ namespace Microsoft.AspNetCore.Blazor.Server.Test
|
|||
var parsedHtml = new HtmlParser().Parse("<html><body>" + scriptTagText + "</body></html>");
|
||||
var scriptElem = parsedHtml.Body.QuerySelector("script");
|
||||
Assert.False(scriptElem.HasChildNodes);
|
||||
Assert.Equal("/_framework/blazor.js", scriptElem.GetAttribute("src"));
|
||||
Assert.Equal("_framework/blazor.js", scriptElem.GetAttribute("src"));
|
||||
Assert.Equal("MyApp.Entrypoint.dll", scriptElem.GetAttribute("main"));
|
||||
Assert.Equal("MyNamespace.MyType::MyMethod", scriptElem.GetAttribute("entrypoint"));
|
||||
Assert.Equal("System.Abc.dll,MyApp.ClassLib.dll", scriptElem.GetAttribute("references"));
|
||||
|
|
|
|||
Loading…
Reference in New Issue