Closed alicoding closed 7 years ago
Hi,
I recently introduced es6 to my project which is still uses requirejs for its bundling but I'm having trouble getting past this task:
es6
requirejs
gulp.task('html', ['styles'], function() { return gulp.src('src/*.html') .pipe($.if('*.js', $.uglify())) .on('error', function (err) { util.log(util.colors.red('[Error]'), err.toString()); }) .pipe(useref({searchPath: ['.tmp', 'src', '.']})) .pipe($.if('*.css', $.minifyCss({compatibility: '*'}))) .pipe($.if('*.html', $.minifyHtml({conditionals: true, loose: true}))) .pipe(gulp.dest('dist')); });
One of the source file I added this:
[].map(b => { });
And now I'm getting this error:
[Error] GulpUglifyError: unable to minify JavaScript Caused by: SyntaxError: Unexpected token: operator (>) File: Project/src/app/components/modals/bundle/modal.js Line: 5
Any idea how I can integrate gulp-babel with this use case?
gulp-babel
Seems like the problem is with uglify.
You're probably right! I'm going to file an issue there.
Hi,
I recently introduced
es6
to my project which is still usesrequirejs
for its bundling but I'm having trouble getting past this task:One of the source file I added this:
And now I'm getting this error:
Any idea how I can integrate
gulp-babel
with this use case?