[StaticWebAssets] Detects pre-compressed assets (#44976)#45448
Closed
[StaticWebAssets] Detects pre-compressed assets (#44976)#45448
Conversation
01083a1 to
2e860c3
Compare
Contributor
There was a problem hiding this comment.
Copilot reviewed 6 out of 9 changed files in this pull request and generated 2 comments.
Files not reviewed (3)
- src/StaticWebAssetsSdk/Targets/Microsoft.NET.Sdk.StaticWebAssets.Compression.targets: Language not supported
- test/Microsoft.NET.Sdk.Razor.Tests/StaticWebAssetsBaselines/Build_Detects_PrecompressedAssets.Build.files.json: Language not supported
- test/Microsoft.NET.Sdk.Razor.Tests/StaticWebAssetsBaselines/PublishWorks_With_PrecompressedAssets.Build.files.json: Language not supported
Comments suppressed due to low confidence (2)
test/Microsoft.NET.Sdk.Razor.Tests/StaticWebAssets/DiscoverPrecompressedAssetsTest.cs:93
- [nitpick] The placeholder in the RelativePath metadata should be updated to reflect the actual fingerprint value used in the test.
asset.GetMetadata("RelativePath").Should().Be("js/site#[.{fingerprint=uncompressed}]?.js.gz");
src/StaticWebAssetsSdk/Tasks/Compression/DiscoverPrecompressedAssets.cs:95
- The conditional check should first check for '.br' before '.gz' to ensure correct assignment of 'fileExtension' and 'assetTraitValue'.
if (!asset.RelativePath.EndsWith(".gz", StringComparison.OrdinalIgnoreCase))
2e860c3 to
4a7aa40
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Detects assets that have been pre-compressed by an external tool to avoid conflicts when we compress our own assets, and they end up on the same path as the existing pre-compressed assets.
Forward port of #44976