$traceurRuntime
is an object in the global scope, not an Angular injectable. This object comes from including the traceur runtime script file (traceur-runtime.js
) in your app. Make sure you include the traceur.RUNTIME_PATH
so the gulp task knows where to find it during compilation and includes it.
Assuming your gulpfile looks something like this:
// gulpfile.js
var traceur = require('gulp-traceur');
// ...
gulp.task('build', function() {
return gulp.src([
traceur.RUNTIME_PATH, // <-- add this
'src/**/*.*'
])
.pipe(traceur({ /* traceur config */ })
.pipe(gulp.dest('/dist'));
});