I am trying to remove copyright comments from my optimized script files. We are using RequireJS with the default UglifierJS. I looked into Uglifier which in itself has a flag called -nc
or --no-comments
, but it does not seem like RequireJS lets you set that option in the build profile. Is there anyway to do this?
You can add the following line to your build.js file used for r.js
preserveLicenseComments: false,
Here is the full documentation: https://github.com/jrburke/r.js/blob/master/build/example.build.js#L519
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With