Combining JS files in WP Rocket

Home Forums MapPress Support Combining JS files in WP Rocket

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #19664
    dkingmahoney
    Participant

    Sorry to ask for spoon-feeding, Chris, but I’ve tried on a few sites/occasions to exclude MapPress and Google API when combining scripts in WP Rocket and have not had success.  I’ve had to turn off combining JS altogether and accept the hit on performance.

    Excluding scripts is addressed generally in the FAQ but do you know *exactly* what works in the “Excluded JS Files” field in WP Rocket?

    This does not:

    maps.googleapis.com/(.*).js
    /wp-content/plugins/mappress-google-maps-for-wordpress/(.*).js

    Nor anything I’ve tried to capture these from the FAQ (and I think the /build/ script file names have been updated?)

    maps.googleapis.com
    mappress_index.js
    mappress_admin_index.js

    Thanks in advance for any help!

    #19665
    Chris
    Keymaster

    Hi,

    I don’t use WP Rocket, so I don’t know exactly how to prevent it from mangling scripts, but I can tell you all the MapPress JS files that may be used in the frontend.

    Have you tried switching on the iframes option in the MapPress settings?  That might also work.

    MapPress itself only has 1 file.  Note that it’s “index_mappress” not mappress_index“:
    /build/index_mappress.js

    The google clustering library is included with the plugin, and it’s loaded if you use clustering:
    lib/js-markerclustererplus-main/modified-clusterer.js

    The Leaflet engine and clustering are loaded from unpkg, if you use Leaflet:
    leaflet.js
    leaflet-omnivore.min.js
    leaflet.markercluster.js

     

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.