minify-html
minify-html copied to clipboard
Add `lightningcss` and `minify-js` feature flags
This PR adds the lightningcss and minify-js feature flags to the minify-html crate.
It allows significantly lighter and faster compilation for users who don't use the provided CSS/JS minifiers. It may also help solving dependency hell issues.
Changes:
- In
minify-html/Cargo.toml, dependencieslightningcssandminify-jsare optional. - Feature flags
lightningcssandminify-jsare enabled by default, therefore the current behavior is preserved. - In
Cfg, fieldsminify_cssandminify_jsare behind feature flags. - Tests that use the CSS/JS minifiers are behind feature flags.
In cargo release mode of the binary size used minify-html.
- Those two dependencies about 10MB.
- And
minify-html-commonabout 9M