dotnet / dotnet/aspnetcore

Extend Blazor "insignificant whitespace trimming" into Razor Pages and MVC.

Open
#23,570 3 comments 17 reactions 0 assignees View on GitHub
affected-all area-mvc enhancement feature-razor.language severity-nice-to-have
Dominant language
C#
Stars
38.4k
Forks
10.9k
Avg merge
2d 6h
Merged PRs (30d)
290

Description

Based on [Blazor whitespace trimming](https://github.com/dotnet/aspnetcore/issues/23568) issue I create this one to track a `feature request` to extend that functionality to Razor Pages and MVC View (aka `.cshtml` filetypes)

I know that the motivation behind this improvement on blazor is about diffing the tree (something it doesn't happen on razor/mvc), but it also have other bonuses in regards to performance because the smaller payload and the fact that it looks like actually may be something very low cost since the work will be done by the blazor team, looks like a great fit to add value to the framework as a whole.

Here's one of many example/approaches on how one would implement a solution like that right now to minifying `.cshtml` files: https://debugandrelease.blogspot.com/2018/11/automatically-minifying-cshtml-files-in.html

as you can see, this requires lots of steps/works and extra dependencies,
joining forces with blazor team I think this could be a very consistent framework-wide feature.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.