dotnet / dotnet/roslyn

[Feature] Minify output

Open
#85,561 1 comment 8 reactions 0 assignees View on GitHub
Area-Razor Area-Razor-Compiler Feature Request
Dominant language
C#
Stars
20.7k
Forks
4.3k
PR merge metrics
PR metrics pending

Description

It would be very helpful if the razor compiler would produce minified output.

The simplest approach would be to
- remove whitespace between elements (e.g. convert double spaces to single space, trim trailing/leading spaces)
- remove whitespace within attributes (e.g. `class=" foo bar "`)

A full-featured minifier can do much more than that - but I propose that the basics above would be good enough.

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.