'gulp-babel throwing error: Uncaught TypeError: Cannot set properties of undefined (setting 'moment')
The below gulp task is throwing the error: Uncaught TypeError: Cannot set properties of undefined (setting 'moment')
return gulp.src([
paths.jquery + "jquery.js",
paths.bootstrap + "js/bootstrap.js",
paths.angular + "angular.min.js",
])
.pipe(babel({
presets: ['@babel/preset-env']
}))
.pipe(concat('support.js'))
.pipe(uglify({ mangle: false }))
.pipe(gulp.dest('public/assets/js/'));
The issue occurs only when you pipe babel. Can someone please guide?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
