OddOneOut / bwp-minify

A WordPress Minification plugin that relies on Minify PHP library and WordPress's enqueueing system to serve minified CSS and JS to your audience
http://betterwp.net/wordpress-plugins/bwp-minify/
49 stars 23 forks source link

Default *.min.js to excluded from minification #73

Open Sophist-UK opened 7 years ago

Sophist-UK commented 7 years ago

Just implemented bwp-minify on my site and had to go through and manually exclude js fles which were already minified.

These fell into two camps:

a. js files named .min.js b. js files which were not .min.js

I would like to propose two possible enhancements:

  1. *.min.js files are excluded from minification by default; and / or
  2. bwp-minify examines js files just before it minifies them and decides whether they have already been minified. Note: Some pre-minified files are modified post minification to e.g. add copyright comments at the start etc., so determining whether js files are already minified needs to be done carefully; and / or
  3. Examine the output js file after minification to see whether it is valid and if not serve the original file.