-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wire up build targets to exclude content items from iOS and Android checks #4861
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems legit.
|
||
<!-- Update Content files that are managed by the Razor SDK to opt out of iOS and Android content-checks --> | ||
<ItemGroup> | ||
<_ContentNotStaticWebAsset Include="@(Content)" Exclude="@(StaticWebAsset)" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this needs to be as below:
<_ContentNotStaticWebAsset Include="@(Content)" Exclude="@(StaticWebAsset)" /> | |
<_ContentNotStaticWebAsset Include="@(Content)" Exclude="%(StaticWebAsset.OriginalItemSpec)" /> |
The reason is that StaticWebAssets always use the full path to the item, and capture the original definition within OriginalItemSpec
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Turns out we don't need to do this - RazorSDK removes SWA items from Content which makes this a lot easier since we don't have to do set intersections (the list of items that are neither SWA nor ScopedCssInputs).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we still need to do this for ScopedCssInputs as they get removed from SWA as part of bundling (but I might be wrong)
src/BlazorWebView/src/Maui/build/Microsoft.AspNetCore.Components.WebView.Maui.targets
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look good to me.
Thanks @pranavkm!
Fixes #791