Skip to content
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

Move asset compression to the Static Web Assets SDK from the Blazor Webassembly SDK #46998

Closed
javiercn opened this issue Mar 2, 2023 · 1 comment · Fixed by dotnet/sdk#31559
Assignees
Labels
area-blazor Includes: Blazor, Razor Components enhancement This issue represents an ask for new feature or an enhancement to an existing one feature-razor-sdk
Milestone

Comments

@javiercn
Copy link
Member

javiercn commented Mar 2, 2023

Static file compression happens within the Blazor pipeline, we should not require the Blazor SDK to leverage compression of assets.

  • The general design should follow an approach similar to the one provided by scoped CSS or JS modules.
  • We need to have a CompressedFile item group or similar that can be used to declare that the file needs to be compressed.
  • We probably want to have a CompressFilePattern item group so that we can declare patterns for files we want to compress.
    • Our tasks already support evaluating glob patterns, so this is "easy" to do.
    • We need to consider whether we want to also support "exclude" patterns, as this makes easy to filter out other content that might have already been processed ahead of time. (Images, fonts, etc.)
  • We need to have two targets one for compressing during build and one for compressing during publish.
  • Any part of the pipeline that requires compression must run before the build/publish compression targets.
  • The build and publish compression targets need to consume the list of static web assets up to the point of generation and the CompressedFile items, as they'll produce new Static Web Assets representing the final files.
  • Static Web Assets representing compressed files contain metadata that correlates them to their uncompressed version, that can be used for locating the original asset.
@ghost
Copy link

ghost commented Mar 3, 2023

Thanks for contacting us.

We're moving this issue to the .NET 8 Planning milestone for future evaluation / consideration. We would like to keep this around to collect more feedback, which can help us with prioritizing this work. We will re-evaluate this issue, during our next planning meeting(s).
If we later determine, that the issue has no community involvement, or it's very rare and low-impact issue, we will close it - so that the team can focus on more important and high impact issues.
To learn more about what to expect next and how this issue will be handled you can read more about our triage process here.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-blazor Includes: Blazor, Razor Components enhancement This issue represents an ask for new feature or an enhancement to an existing one feature-razor-sdk
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants
@javiercn @MackinnonBuck @mkArtakMSFT and others