File tree Expand file tree Collapse file tree 1 file changed +9
-8
lines changed
TestHostPrerenderWASM/TestHostPrerenderWASM.Client Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change 66var 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
2526await builder . Build ( ) . RunAsync ( ) ;
You can’t perform that action at this time.
0 commit comments