doublesecretagency / craft-googlemaps

Google Maps plugin for Craft CMS - Maps in minutes. Powered by the Google Maps API.
https://plugins.doublesecretagency.com/google-maps/
Other
10 stars 8 forks source link

Minifying the googlemaps.js and dynamicmap.js on cpresources #98

Closed sander-lameco closed 8 months ago

sander-lameco commented 8 months ago

Since the files are loaded in the frontend, would it be possible to minify these files? Or is it something we misconfigured? We're asking since Lighthouse and SEranking are giving off warnings as the files are not minified.

lindseydiloreto commented 8 months ago

Thanks for the feature request! I've considered this before... my thought has been to leave it unminified to make the methods more discoverable.

However, there is a fair case for minifying them as well. I'll see if I can provide an option to load minified versions of those files.

Not sure what the ETA is, but I'll post any updates back on this thread.

sander-lameco commented 8 months ago

Thanks @lindseydiloreto , no problem, there is no real pressure behind this as it is only a warning but would be nice to be able to minify it in the (near) future.

lindseydiloreto commented 8 months ago

Great news, this is done! Now available in v4.3.7 👍

If using a PHP config file, there is now an additional setting to minifyJsFiles. Enabling this will serve up the minified versions of those front-end files.