gtm4wp icon indicating copy to clipboard operation
gtm4wp copied to clipboard

Minification of frontend JS ressources

Open sque89 opened this issue 1 year ago • 6 comments

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!

sque89 avatar Mar 24 '23 14:03 sque89

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.

morvy avatar Mar 24 '23 14:03 morvy

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

duracelltomi avatar Apr 03 '23 13:04 duracelltomi

you mean something like Gulp script to generate minified versions?

morvy avatar Apr 03 '23 13:04 morvy

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

sque89 avatar Apr 03 '23 14:04 sque89

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

duracelltomi avatar Apr 03 '23 14:04 duracelltomi

@duracelltomi any news on this one?

sque89 avatar Apr 14 '23 14:04 sque89