Fix CSS and HTML minification for production builds
The Bug
The this.minifyCSS
filter and minifyHTML
transform are both being called on npm run build
with ELEVENTY_ENV
set to production
.
-
this.minifyCSS
is returning the original stylesheet instead of the minified version -
minifyHTML
is likewise returning the original content
To Fix
- Add
return minified
inside theif
statement inthis.minifyCSS
- Switch
outputPath === true
tooutputPath !== false
inminifyHTML
Edited by Reuben L. Lillie