package.json command cross-env ELEVENTY_ENV=prod NODE_OPTIONS=--max-old-space-size=4096 eleventy doesn't minify HTML because the config file only checks for NODE_ENV.
Also turned on conservativeCollapse and preserveLineBreaks, which will collapse whitespace to just 1 space or 1 newline instead of removing it entirely. This fixes an issue where mathjax blocks would not have spaces between text.
package.json
commandcross-env ELEVENTY_ENV=prod NODE_OPTIONS=--max-old-space-size=4096 eleventy
doesn't minify HTML because the config file only checks forNODE_ENV
.Also turned on
conservativeCollapse
andpreserveLineBreaks
, which will collapse whitespace to just 1 space or 1 newline instead of removing it entirely. This fixes an issue where mathjax blocks would not have spaces between text.