Skip to content

Commit

Permalink
refactor: lower level of CSS minification
Browse files Browse the repository at this point in the history
The documentation states it can be "dangerous", so better be on the
safe side. This also aligns with the defaults of minify_html.
  • Loading branch information
ctron committed Dec 20, 2023
1 parent ea820c7 commit 3ac17f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/processing/minify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ pub fn minify_css(bytes: Vec<u8>) -> Vec<u8> {
use css_minify::optimizations::*;

if let Ok(css) = std::str::from_utf8(&bytes) {
match Minifier::default().minify(css, Level::Three) {
match Minifier::default().minify(css, Level::One) {
Ok(result) => return result.into_bytes(),
Err(err) => {
tracing::warn!("Failed to minify CSS: {err}");
Expand Down

0 comments on commit 3ac17f0

Please sign in to comment.