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

Check for ELEVENTY_ENV for minifier #237

Merged
merged 2 commits into from
May 3, 2024

Conversation

Luke-zhang-04
Copy link
Contributor

@Luke-zhang-04 Luke-zhang-04 commented Dec 9, 2023

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.

@oleeskild oleeskild merged commit 40c2b78 into oleeskild:main May 3, 2024
1 check passed
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 this pull request may close these issues.

2 participants