Wondering about WordPress plugin assets

I didn’t watch the screencast so I don’t know if the question is answered there. I pretty know how to dequeue the plugins CSS/JS and add them in the main Sage .css and .js. What I am wondering is why !

The pros :

  • less HTTP queries
  • everything is minimized
  • it’s more difficult to know that Wordpress powers the website, and more difficult to figure out which plugins are used

The cons :

  • if just one CSS or JS from any plugin changes, the user still has to download the whole main CSS or JS with all the other things that didn’t change
  • more work to maintain : each time a plugin assets adds/removes new CSS/JS files when you upgrade, you have to maintain the theme

Your thoughts ?

It is, the screencast shows how to dequeue plugin assets and how to add them to the asset pipeline

If you build the assets again, yes, there will be new CSS/JS files if updates were made to any of the assets that make up those files. That includes assets from 3rd party Bower packages (unless you’re overriding them).

This is true. It really depends on how much optimization you’re wanting to do on your sites.

Is it necessary? Nah.
Is it better? Yes :blush: .

1 Like