Javascript-Comments in Production

When in production:
AnyMod removes comments out of the HTML-code.
AnyMod removes comments out of the SCSS-code.

But the JavaScript gets minified without the comments beeing stripped out.
Is this the intended behaviour? The minified JS still contains my comments.

I left a number of ‘rather internal’ comments inside some of my JS-Code all across several anymod-projects. I might want to go through them.

I was just reading a little bit:
Licence-comments (legal stuff) might have to stay when stripping JS-Comments

Any update you may have would be greatly appreciated

Hi Stefan, you should assume that any code in your mod is going to be “client-side”, meaning it will be delivered to the browser. This is not always the case, but the code fields (HTML, CSS, JS) are not intended to be used for secret or internal information.

Hi Tyler,

well, SCSS does parse out Comments.
I expected JS to do so as well.

Okay. Thank you for your reply.

I will have to work my way through all of my comments inside the JS Code (for all mods on all projects) next week.

Best
Stefan

1 Like