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

Do not minify HTML entry point #8547

Beuc opened this issue May 4, 2019 · 3 comments

Do not minify HTML entry point #8547

Beuc opened this issue May 4, 2019 · 3 comments


Copy link

@Beuc Beuc commented May 4, 2019

Since a few versions emcc also minifies the HTML entry point (built from shell.html).

This file is pretty small and does not benefit a lot from minification. However minification is a significant hassle when testing changes in a customized shell.html, or when shipping an HTML entry point that is possibly further customized by the end user (like I do with RenPyWeb, where I provide a generic runtime for Ren'Py games).

I couldn't find an option to selectively remove minification of the HTML entry point either.

Copy link

@kripken kripken commented May 6, 2019

cc @juj who added that, I believe.

Copy link

@juj juj commented May 8, 2019

You can pass -s MINIFY_HTML=0 to disable the HTML minification. See


Lines 1381 to 1386 in f64d84e

// Specifies whether the generated .html file is run through html-minifier. The set of
// optimization passes run by html-minifier depends on debug and optimization levels. In
// -g2 and higher, no minification is performed. In -g1, minification is done, but whitespace
// is retained. Minification requires at least -O1 or -Os to be used. Pass -s MINIFY_HTML=0
// to explicitly choose to disable HTML minification altogether.
var MINIFY_HTML = 1;

Copy link
Contributor Author

@Beuc Beuc commented May 8, 2019

Thanks. I did look for it in emcc --help (where minification-influencing -g1/-g2 options are located) and in

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants