Skip to content

Commit 0ea6b30

Browse files
committed
Disabled some Blazor features to make the deployed files smaller and hopefully quicker to startup
1 parent e5ad06e commit 0ea6b30

File tree

1 file changed

+52
-40
lines changed

1 file changed

+52
-40
lines changed
Lines changed: 52 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,55 @@
11
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">
2-
<PropertyGroup>
3-
<TargetFramework>net9.0</TargetFramework>
4-
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
5-
<WarningsAsErrors />
6-
<Nullable>enable</Nullable>
7-
<AssemblyName>ProgrammerAl.Site</AssemblyName>
8-
<RootNamespace>ProgrammerAl.Site</RootNamespace>
9-
<LangVersion>latest</LangVersion>
10-
<EnableNETAnalyzers>true</EnableNETAnalyzers>
11-
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
12-
<!--<RunAOTCompilation>true</RunAOTCompilation>
2+
<PropertyGroup>
3+
<TargetFramework>net9.0</TargetFramework>
4+
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
5+
<WarningsAsErrors />
6+
<Nullable>enable</Nullable>
7+
<AssemblyName>ProgrammerAl.Site</AssemblyName>
8+
<RootNamespace>ProgrammerAl.Site</RootNamespace>
9+
<LangVersion>latest</LangVersion>
10+
<EnableNETAnalyzers>true</EnableNETAnalyzers>
11+
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
12+
<!--<RunAOTCompilation>true</RunAOTCompilation>
1313
<WasmStripILAfterAOT>true</WasmStripILAfterAOT>-->
14-
</PropertyGroup>
15-
<ItemGroup>
16-
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="9.0.5" />
17-
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="9.0.5" PrivateAssets="all" />
18-
<PackageReference Include="Microsoft.Extensions.Http" Version="9.0.5" />
19-
<PackageReference Include="Microsoft.NET.ILLink.Tasks" Version="9.0.5" />
20-
<PackageReference Include="Microsoft.NET.Sdk.WebAssembly.Pack" Version="9.0.5" />
21-
<PackageReference Include="System.Text.Json" Version="9.0.5" />
22-
</ItemGroup>
23-
<ItemGroup>
24-
<Folder Include="wwwroot\css\custom-modules\" />
25-
<Folder Include="wwwroot\images\" />
26-
</ItemGroup>
27-
<ItemGroup>
28-
<Content Update="Pages\PresentationSlides.razor">
29-
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
30-
</Content>
31-
<Content Update="Shared\EmptyLayout.razor">
32-
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
33-
</Content>
34-
</ItemGroup>
35-
<Target Name="PreBuild" BeforeTargets="PreBuildEvent" Condition="'$(Configuration)'=='DEBUG'">
36-
<Exec Command="npm run build-dev --prefix $(ProjectDir)/../CustomNpmModules/tailwind" />
37-
</Target>
38-
<PropertyGroup>
39-
<NuGetAudit>true</NuGetAudit>
40-
<NuGetAuditMode>all</NuGetAuditMode>
41-
<NuGetAuditLevel>low</NuGetAuditLevel>
42-
</PropertyGroup>
14+
</PropertyGroup>
15+
<ItemGroup>
16+
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="9.0.5" />
17+
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="9.0.5" PrivateAssets="all" />
18+
<PackageReference Include="Microsoft.Extensions.Http" Version="9.0.5" />
19+
<PackageReference Include="Microsoft.NET.ILLink.Tasks" Version="9.0.5" />
20+
<PackageReference Include="Microsoft.NET.Sdk.WebAssembly.Pack" Version="9.0.5" />
21+
<PackageReference Include="System.Text.Json" Version="9.0.5" />
22+
</ItemGroup>
23+
<ItemGroup>
24+
<Folder Include="wwwroot\css\custom-modules\" />
25+
<Folder Include="wwwroot\images\" />
26+
</ItemGroup>
27+
<ItemGroup>
28+
<Content Update="Pages\PresentationSlides.razor">
29+
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
30+
</Content>
31+
<Content Update="Shared\EmptyLayout.razor">
32+
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
33+
</Content>
34+
</ItemGroup>
35+
<Target Name="PreBuild" BeforeTargets="PreBuildEvent" Condition="'$(Configuration)'=='DEBUG'">
36+
<Exec Command="npm run build-dev --prefix $(ProjectDir)/../CustomNpmModules/tailwind" />
37+
</Target>
38+
<PropertyGroup>
39+
<NuGetAudit>true</NuGetAudit>
40+
<NuGetAuditMode>all</NuGetAuditMode>
41+
<NuGetAuditLevel>low</NuGetAuditLevel>
42+
</PropertyGroup>
43+
<PropertyGroup>
44+
<PublishTrimmed>true</PublishTrimmed>
45+
<TrimMode>full</TrimMode>
46+
47+
<!--Disable Localization-->
48+
<InvariantGlobalization>true</InvariantGlobalization>
49+
<InvariantTimezone>true</InvariantTimezone>
50+
<BlazorEnableTimeZoneSupport>false</BlazorEnableTimeZoneSupport>
51+
52+
<!--Disable WASM Exception Handling-->
53+
<WasmEnableExceptionHandling>false</WasmEnableExceptionHandling>
54+
</PropertyGroup>
4355
</Project>

0 commit comments

Comments
 (0)