• Resolved Wombat Plugins

    (@maartenbelmans)


    I am a plugin developer and my customers are reporting issues because they use Litespeed to minify their Javascript files.

    In my JS file, I have this line:

    return(""+e[0]).replace("true"==e[1]?/ /g:"","").length

    Notice the regular expression / /g. Litespeed will minify this and remove the space, like so //g.

    So now, it’s no longer a valid regular expression, but a JS comment. This breaks all the code coming after it.

    Can your team look into this?

Viewing 5 replies - 1 through 5 (of 5 total)
  • You can exclude affected js files from being minified|combined:

    /wp-admin/admin.php?page=litespeed-page_optm#settings_tuning

    Thread Starter Wombat Plugins

    (@maartenbelmans)

    I know but that doesn’t fix the real issue. The minifying algorithm should be capable of detecting regex.

    You should it use anyway, because you can’t expect that LiteSpeed will fix it tomorrow…. or use \s instead for regex spaces.

    • This reply was modified 2 years, 7 months ago by serpentdriver.
    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    thanks for your information

    I have passed it to our devs , but as @serpentdriver said , it’s not something fixed in next day , meanwhile , please exclude the file from being minified

    API: Filter litespeed_optimize_js_excludes is supported. Elements with attribute data-no-optimize=”1″ in html code will be excluded.

    best regards,

    Thread Starter Wombat Plugins

    (@maartenbelmans)

    Thank you! Much appreciated!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘BUG REPORT: wrong minification’ is closed to new replies.