If you're using gulp, then you can use this plugin:
Install this plugin with the command:
npm install gulp-remove-logging
Next, add this line to your gulpfile:
var gulp_remove_logging = require("gulp-remove-logging");
Lastly, add the configuration settings (see below) to your gulpfile.
Task Configuration
gulp.task("remove_logging", function() { return gulp.src("src/javascripts/**/*.js") .pipe( gulp_remove_logging() ) .pipe( gulp.dest( "build/javascripts/" ) ); });