UglifyJS uses commas to chain function, object and variable declarations. This is fine for productions and when the file is being minified however it makes it extremely hard to walk through the javascript with breakpoints when debugging js. I need to know how to turn this feature off in the UglifyJS Grunt Plugin.
Below is what the output looks like.
var boom = function(a) {
...
},
bing = function(b){
...
},
bam = function(c) {
...
};
This might help Gulp users using gulp-uglify :
.pipe( uglify({
compress:{
sequences:false
}
}) )
Ok I figured it out. In the the Gruntfile under options > compress add an option
sequences: false
that will stop the semi-colons being replaced with commas. You can then use breakpoints like you would normally.
uglify: {
options: {
compress: {
sequences: false
}
}
}
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