Skip to content

Commit

Permalink
Merge pull request #19384 from unoplatform/dev/jela/ttf-compress
Browse files Browse the repository at this point in the history
feat(wasm): Use asset pre-compression for font files
  • Loading branch information
jeromelaban authored Feb 4, 2025
2 parents bc64ed9 + 4e3306a commit 3c3c6be
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/Uno.Sdk/targets/Uno.SingleProject.Wasm.targets
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,15 @@
<WasmAotFileName Condition="$(WasmAotFileName) == ''">aot.profile</WasmAotFileName>
<WasmAotProfilePath Condition=" $(WasmAotProfilePath) == '' AND Exists('$(WasmProjectFolder)$(WasmAotFileName)') ">$(WasmProjectFolder)$(WasmAotFileName)</WasmAotProfilePath>
<WasmAotProfilePath Condition=" $(WasmAotProfilePath) == '' AND Exists('$(WasmAotFileName)') ">$(WasmAotFileName)</WasmAotProfilePath>

<UnoEnableDefaultCompressedItems Condition=" '$(UnoEnableDefaultCompressedItems)' == '' ">true</UnoEnableDefaultCompressedItems>
<!-- based on https://github.com/dotnet/sdk/blob/be30c95a22d25aaedaed184ee4d188c5e31218c8/src/StaticWebAssetsSdk/Targets/Microsoft.NET.Sdk.StaticWebAssets.Compression.targets#L25 -->
<CompressionIncludePatterns Condition="'$(UnoEnableDefaultCompressedItems)' == 'true' AND '$(TargetFrameworkVersion)'!='' AND $([MSBuild]::VersionGreaterThanOrEquals('$(TargetFrameworkVersion)', '9.0'))">
$(CompressionIncludePatterns);
**/*.ttf;
**/*.woff;
**/*.woff2;
</CompressionIncludePatterns>
</PropertyGroup>

<ItemGroup Condition="$(EnableDefaultUnoItems) == 'true'">
Expand Down

0 comments on commit 3c3c6be

Please sign in to comment.