express-minify icon indicating copy to clipboard operation
express-minify copied to clipboard

How to skip minification for already minified assets?

Open mcandre opened this issue 4 years ago • 1 comments

Some devs have pre-minified files to serve, like self-hosted jquery.min.js, or bootstrap-min.css. What's a good rule to apply to save some CPU cycles and not re-minify these file patterns?

... Could this rule be applied to express-minify by default?

mcandre avatar Jul 08 '19 19:07 mcandre

What's a good rule to apply to save some CPU cycles and not re-minify these file patterns?

With per response options it is currently res.minifyOptions.minify = false; usually somewhere in middleware. Can be conditionalled or applied globally. Conditions are up to you as with minified or not usage in your view rendering (HTML generation). :)

Martii avatar Jul 08 '19 23:07 Martii