duracelltomi / gtm4wp

Google Tag Manager plugin for WordPress
https://gtm4wp.com/
GNU General Public License v3.0
147 stars 95 forks source link

Minification of frontend JS ressources #257

Open sque89 opened 1 year ago

sque89 commented 1 year ago

I know it wouldn't save a lot, but is there a specific reason why the scripts loaded on the frontend are not minified? If no, could that be added? I would provide a PR but first it would be good to discuss what the preferred approach would be.

Thanks!

morvy commented 1 year ago

I also think the scripts should be minified. Plugin could respect SCRIPT_DEBUG constant and load formatted scripts only if it's set to true.

duracelltomi commented 1 year ago

I would be happy to add this, could someone help me wringing the corresponding scripts?

morvy commented 1 year ago

you mean something like Gulp script to generate minified versions?

sque89 commented 1 year ago

@duracelltomi @morvy provided a PR. Happy to receive some feedback.

duracelltomi commented 1 year ago

Thanks for the quick addition! I am just in the work on closing dev on v1.17, I will check back a bit later to this PR

sque89 commented 1 year ago

@duracelltomi any news on this one?