I am using gulp -babel to translate my es6 code to es5
gulp.task('build_all_debug', ['config', 'compile'], function() { var stream = gulp.src(['public/js/config.js', 'public/js/*.js', 'public/compiled/*.js']) .pipe(babel({ presets: ['es2015'] })) .pipe(concat('app.js')) .pipe(gulp.dest('public/dist')); return stream; });
While it basically works fine, it does not actually translate the card and set. My code still has them in my js code, and when I run unit test with karma / mocha / phantomJs, I got the following error:
PhantomJS 2.1.1 (Mac OS X 0.0.0) notes.controller "before each" hook: workFn for "loads notes from the service" FAILED Can't find variable: Map activate@public /dist/app.js:2402:39
Is there any way to get babel to translate the map and set the object and array in es5?
swang source share