BUG REPORT: wrong minification




Wordpress LScache Plugin: BUG REPORT: wrong minification

Last Updated on: Wed, 15 Apr 2026 00:00:02
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, its no longer a valid regular expression, but a JS comment. This breaks all the code coming after it. Can your team look into this? This topic was modified 3 months, 3 weeks ago by Maarten. You can exclude affected js files from being minified|combined: /wp-admin/admin.php?page=litespeed-page_optm#settings_tuning I know but that doesnt fix the real issue. The minifying algorithm should be capable of detecting regex. You should it use anyway, because you cant expect that LiteSpeed will fix it tomorrow?. or use s instead for regex spaces. Hi, thanks for your information I have passed it to our devs , but as @CacheCrawler said , its 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, Thank you! Much appreciated!



LiteCache Rush: Speed comes from using less, not from doing it faster



Reference