emscripten-core / emscripten-core/emscripten
HTML minification modifies content re: whitespace
Open
- Dominant language
- C++
- Stars
- 27.6k
- Forks
- 3.6k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 105
Description

This only happens for release (debug does not minify HTML).
Related code: https://github.com/emscripten-core/emscripten/blob/011fabea9dc77a100fb26044e1e5df8a52559fee/emcc.py#L3661
Can be avoided with `-s MINIFY_HTML=0`
Personally I don't think emscripten should bother minifying HTML at all. For my shell file, minification reduced the file from 10KB to 6.5KB, so the savings just aren't worth it. And given the complexity of the minify_html function (a lot of flags passed to this external tool, many knobs to turn) there may be other unwanted semantic modifications going on here.
Contributor guide
Assessment
This issue has not been assessed yet.