• Resolved Hector Cabrera

    (@hcabrera)


    Hi there!

    Using the latest version of the W3 Total Cache.

    Just noticed that the “Never minify the following JS files” isn’t working at all. I’m trying to exclude a specific plugin’s JS files but W3TC keeps minifying them.

    I added /wp-content/plugins/plugin-name/path/to/script.js to the “Never minify the following JS files” textarea, made sure to save settings, cleared W3TC’s cache a few times, etc. and so far I haven’t been able to exclude said file.

    Any suggestions?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @hcabrera

    Thank you for reaching out and I am happy to help!

    I’ve tried to replicate this and I was able to exclude a specific file from being minified.
    Once added to the Never minify the following?JS?files: save all settings purge the cache, and refresh the page in incognito, the file is no longer minified.
    Can you please share the website URL and try adding /wp-includes/js/jquery/jquery.min.js Never minify the following?JS?files: save all settings purge the cache and let us know if this file is loading outside of minified files.

    Thanks!

    Thread Starter Hector Cabrera

    (@hcabrera)

    Hey @vmarko,

    So I tried excluding a JS file on a staging site and it worked there as expected. It’s on my localhost environment (Apache server setup via Laragon) where it doesn’t.

    Any suggestions on what to try to understand why W3TC doesn’t exclude files on my local dev server? (The reason I’m testing the minify JS feature on localhost is to check for conflicts with third party plugins for development purposes.)

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @hcabrera

    Thank you for your feedback.
    Once the path is added, if it’s a correct path, the file is excluded. The only thing that can prevent this from showing is if the cache is not purged, or you have another layer of caching besides W3 Total Cache.

    Can you please share the URL of the page that you are having issues with and the exact path of the file you are trying to exclude?

    Thanks!

    Thread Starter Hector Cabrera

    (@hcabrera)

    I’d love to, but as I said before this only happens on my local development environment so unfortunately I don’t have an URL that I can share.

    I’ll try debugging the plugin myself and see if I can figure out why it doesn’t work on localhost. Does WT3C has a Github repository? If so, are you guys open to pull requests?

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @hcabrera

    Please let me know if you find anything!
    I am sorry if I could not be more helpful, however, please understand that I would need more information about the environment.
    And yes, you can check out our GitHub repository and create a pull request which will be reviewed and addressed by the dev team.

    Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Exclude JS from minification not working?’ is closed to new replies.