Tagged: 

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #92442
    Dan G
    Guest

    I’m getting an error due to minify, where I used “Non-blocking using defer”.
    The error is “ReferenceError: wp is not defined” on the line wp.i18n.setLocaleData.

    Long story short, I’m trying to exclude files in /wp-includes/js/dist because I suspect that there’s a tree of dependencies with WP js files.

    I’m trying to add the following to “Never minify the following JS files” (with regex enabled):

    wp-includes\/js\/dist\/.*

    But that doesn’t seem to work.

    Can you help?

    Thank you!

    #92617

    Hello Dan,

    Thank you for reaching out and I am happy to assist you with this.
    In W3 Total Cache, Excluding JS Files From Minify does work. However, as you can see in the description:
    Always ignore the specified JS files. Use relative paths.
    So you should add one path per line, for example:
    /wp-includes/js/jquery/jquery.min.js
    /wp-includes/js/jquery/jquery-migrate.min.js
    You cannot use regex to exclude multiple files in the same directory.
    Once added, make sure to save all settings and purge the cache.

    I hope this helps!

    Thanks!

    #92894
    Dan G
    Guest

    Oh, I see. I didn’t get that intent from the description when I first read it.
    Thanks!

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Excluding JS files from minify doesn’t work’ is closed to new replies.