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

How to build without minifying HTML #3107

Closed
BrunoBernardino opened this issue Dec 2, 2017 · 2 comments · May be fixed by danielres/gatsby#1
Closed

How to build without minifying HTML #3107

BrunoBernardino opened this issue Dec 2, 2017 · 2 comments · May be fixed by danielres/gatsby#1

Comments

@BrunoBernardino
Copy link
Contributor

I'm having this problem which is mentioned here in the docs, but there's no explanation on how to do that (building without minifying the HTML).

@dbrookes
Copy link
Contributor

dbrookes commented Dec 2, 2017

This is a setting on your production environment not Gatsby - the docs are saying to disable HTML minification on your CDN or web server you have deployed the site to.

For example, if you use Cloudflare you should disable HTML under Speed -> Auto Minify as it'll strip out HTML comments as part of the minification and break React.

@BrunoBernardino
Copy link
Contributor Author

@dbrookes THANK YOU! That totally explains why I was so baffled to not finding any webpack setting to override. I completely forgot Cloudflare was doing that. Disabling it fixed the problem.

KyleAMathews pushed a commit that referenced this issue Dec 4, 2017
* Make it clearer Gatsby isn't minifying HTML

It would probably help with #3107 (I saw other people encountered that issue)

* Update deploy-gatsby.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants