Error removing javascript comments
-
In the settings panel on the optimization tab.
At the bottom of the page you have the option remove comments. This option is removing non-commenting code and causing error when combining js files.
I use the axios library and there is the following code:
‘Accept’: ‘application/json, text/plain, */*’
I use gulp to minify and remove comments, so the final code looks like this:
Accept: “application/json, text/plain, */*”
After enabling the option to remove comments from lightspeed cache it looks like this:
Accept: “application/json, text/plain, *
Giving this error in the browser console:
Uncaught SyntaxError: Invalid or unexpected token
The topic ‘Error removing javascript comments’ is closed to new replies.