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

Open
Beuc opened this issue May 4, 2019 · 3 comments

Comments

Projects
None yet
3 participants
@Beuc
Copy link
Contributor

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.

@kripken

This comment has been minimized.

Copy link
Member

commented May 6, 2019

cc @juj who added that, I believe.

@juj

This comment has been minimized.

Copy link
Collaborator

commented May 8, 2019

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

emscripten/src/settings.js

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;

@Beuc

This comment has been minimized.

Copy link
Contributor Author

commented May 8, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.