Skip to content

Commit 98a4ac5

Browse files
committed
feat(jsut use production): prod
1 parent c50a4d7 commit 98a4ac5

File tree

1 file changed

+9
-8
lines changed
  • TestHostPrerenderWASM/TestHostPrerenderWASM.Client

1 file changed

+9
-8
lines changed

TestHostPrerenderWASM/TestHostPrerenderWASM.Client/Program.cs

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,21 @@
66
var builder = WebAssemblyHostBuilder.CreateDefault(args);
77

88

9-
Console.WriteLine($"INDEPENDENT_CLIENT_GH_PAGES value: '{Environment.GetEnvironmentVariable("INDEPENDENT_CLIENT_GH_PAGES")}'");
10-
Console.WriteLine($"INDEPENDENT_CLIENT_GH_PAGES value: '{Environment.GetEnvironmentVariable("INDEPENDENT_CLIENT_GH_PAGES", EnvironmentVariableTarget.Process)}'");
9+
//Console.WriteLine($"INDEPENDENT_CLIENT_GH_PAGES value: '{Environment.GetEnvironmentVariable("INDEPENDENT_CLIENT_GH_PAGES")}'");
10+
//Console.WriteLine($"INDEPENDENT_CLIENT_GH_PAGES value: '{Environment.GetEnvironmentVariable("INDEPENDENT_CLIENT_GH_PAGES", EnvironmentVariableTarget.Process)}'");
1111

12-
if (Environment.GetEnvironmentVariable("INDEPENDENT_CLIENT_GH_PAGES", EnvironmentVariableTarget.Process) != null)
12+
//if (Environment.GetEnvironmentVariable("INDEPENDENT_CLIENT_GH_PAGES", EnvironmentVariableTarget.Process) != null)
13+
if (builder.HostEnvironment.IsProduction())
1314
{
14-
Console.WriteLine("Condition is TRUE - Adding root components");
15+
//Console.WriteLine("Condition is TRUE - Adding root components");
1516
builder.RootComponents.Add<App>("#app");
1617
builder.RootComponents.Add<HeadOutlet>("head::after");
1718
builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) });
1819
}
19-
else
20-
{
21-
Console.WriteLine("Condition is FALSE - Environment variable is null");
22-
}
20+
//else
21+
//{
22+
// Console.WriteLine("Condition is FALSE - Environment variable is null");
23+
//}
2324

2425

2526
await builder.Build().RunAsync();

0 commit comments

Comments
 (0)