It looks like I need to perform .pipe(ngAnnotate()) during the “scripts” to avoid an Angular “Unknown provider: tProvider ← t” error.
Do you know how I would add this to the sage gulpfile.js? Would it be within the merged.add()?
Thx again!
It looks like I need to perform .pipe(ngAnnotate()) during the “scripts” to avoid an Angular “Unknown provider: tProvider ← t” error.
Do you know how I would add this to the sage gulpfile.js? Would it be within the merged.add()?
Thx again!
Add it like
var jsTasks = function(filename) {
return lazypipe()
.pipe(function() {
return $.if(enabled.maps, $.sourcemaps.init());
})
.pipe($.concat, filename)
.pipe($.ngAnnotate)
.pipe($.uglify)
.pipe(function() {
return $.if(enabled.rev, $.rev());
})
.pipe(function() {
return $.if(enabled.maps, $.sourcemaps.write('.'));
})();
};
Check out Disable uglify in Gulpfile
Just FYI everyone the above suggestion and the steps below worked for me on a recent project:
npm install gulp-ng-annotate --save-dev
var ngAnnotate = require('gulp-ng-annotate');
at the top of the gulpfilepipe(ngAnnotate)
instead because we don’t use the $.
syntax anymore