Gatsby: How to build without minifying HTML

Created on 2 Dec 2017  路  2Comments  路  Source: gatsbyjs/gatsby

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).

Most helpful comment

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.

All 2 comments

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.

@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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

magicly picture magicly  路  3Comments

ghost picture ghost  路  3Comments

mikestopcontinues picture mikestopcontinues  路  3Comments

dustinhorton picture dustinhorton  路  3Comments

KyleAMathews picture KyleAMathews  路  3Comments