• Resolved Samuel

    (@martdsam)


    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

    • This topic was modified 6 years, 10 months ago by Samuel.
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Error removing javascript comments’ is closed to new replies.