-
Notifications
You must be signed in to change notification settings - Fork 10.1k
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
Continue reducing the size of Blazor WebAssembly apps #45010
Comments
Thanks for contacting us. We're moving this issue to the |
Related to #42284 ? |
cc @eerhardt fyi |
@danroth27 @mkArtakMSFT Is there a sample client webassembly project that has all the best settings for getting the project down to the 1.5mb size or maybe less now in .net 7.0? I have applied all the trim settings I can find and removed everything except for the most basic components to load blazor up but I am still riding at 3.1mb. I got the 1.1mb number from this video: https://www.youtube.com/watch?v=Jte_VwsSazs Thanks for the help! EDIT: I ended up finding my issue, I had everything set up in my csproj just fine, it was that my local IIS instance did not have compression enabled properly and the web.config generated by the publish process was also missing details. Once I got this updated I got down to sub 2mb data transfer since it was able to take advantage of the brotli compressed files generated in the publish process. |
@StephenEhlers - have you also installed the If you install that, the |
@StephenEhlers Take a look at https://github.com/danroth27/SatelliteSimulator, which should be ~1MB when published. The key things to get a minimal Blazor WebAssembly app size:
For additional details see https://learn.microsoft.com/aspnet/core/blazor/host-and-deploy/webassembly. |
We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process. |
Closing as the remaining work is already tracked with issues in the runtime repo. That said, this is an effort we're not going to stop and will be looking for new ways to reduce the size as we move forward. |
We should continue to look at reducing the download size of Blazor WebAssembly apps to remove any remaining dead weight code.
Related runtime issues:
On the Blazor side, we could look at enabling more of System.Text.Json by using a source generator.
The text was updated successfully, but these errors were encountered: