question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Minify html should minify css

See original GitHub issue

Problem

CSS is not minified with minify option enabled.

Solution

Change html-minifier option to minify CSS by default

https://github.com/mjmlio/mjml/blob/dad233f7c8dc6ce92845eb048ef743e38e66ce52/packages/mjml-core/src/index.js#L283

Alternatives

Add an option to toggle CSS minification.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
iRyusacommented, Nov 29, 2018

You can now pass any option to html-minifier through the cli/options arguments 👍 So I’m closing this.

1reaction
iRyusacommented, Nov 6, 2018

I think we should just expose an object to pass extra options to minifier instead of mapping them.

cc @kmcb777

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why do many sites minify CSS and JavaScript but not HTML?
This means they can be minified just once whenever they are updated. On the other hand, HTML tends to be dynamically generated, which...
Read more >
What is Minification | Why minify JS, HTML, CSS files - Imperva
To minify JS, CSS and HTML files, comments and extra spaces need to be removed, as well as crunch variable names so as...
Read more >
How to Minify Your Website's CSS, HTML & Javascript
Go to minifycode.com and click the CSS minifier tab. Then paste the CSS code into the input box and click the Minify CSS...
Read more >
Minify Resources (HTML, CSS, and JavaScript)
To minify HTML, try HTMLMinifier ; To minify CSS, try CSSNano and csso. ; To minify JavaScript, try UglifyJS. The Closure Compiler is...
Read more >
Minify CSS – CSS Minifying and Compression Explained
Minification, generally, is a great approach for optimizing websites. Minifying CSS files increases page load times and requires fewer resources ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found