ngmin

angular js $injector:modulerr Failed to instantiate module with mangle

人盡茶涼 提交于 2019-12-13 16:26:25
问题 Trying to uglify angularjs app with mangle causes the error. However I've read that that should be fixed by ngmin. I use ngmin to properly wrap my controller code in an array as required by angular. I can confirm that ngmin works and all my code is wrapped. Only mangling causes the error, mangle:false works just fine. Can anyone confirm whether mangling is supposed to work or if there are edge cases other than the array issue that causes mangling to fail. Thanks. 回答1: I could not get it to

Gulp ngmin + uglify not working properly

三世轮回 提交于 2019-12-04 08:19:31
问题 I have the following gulp task: gulp.task('scripts', function() { return gulp.src(['app/js/app.js', 'app/config/config.js', 'app/js/controllers.js', 'app/js/directives.js' , 'app/js/filters.js', 'app/js/footer.js', 'app/js/guideTour.js', 'app/js/mobileBanner.js', 'app/js/services.js', 'app/js/youtube.js', 'app/js/dataSync.js', 'app/js/addthis.js']) //.pipe(jshint('.jshintrc')) .pipe(jshint.reporter('default')) .pipe(concat('main.js')) .pipe(ngmin()) .pipe(gulp.dest('app/dist/js')) .pipe