我在gulpfile中执行任务,以某种顺序连接所有js文件。但是在连接并重新加载页面之后,控制台会写道:
Uncaught TypeError: e.indexOf is not a function
这是我的任务:
gulp.task('scripts', function() {
return gulp.src([
'source/components/jquery/dist/jquery.min.js',
'source/components/jquery-ui/jquery-ui.min.js',
'source/components/easing/easing-min.js',
'source/components/hoverintent/dist/hoverintent.min.js',
'source/components/bootstrap/dist/js/bootstrap.min.js',
'source/components/select2/dist/js/select2.min.js',
'source/components/jquery.uniform/src/js/jquery.uniform.js',
'source/components/slick-carousel/slick/slick.min.js',
'source/components/magnific-popup/dist/jquery.magnific-popup.min.js',
'source/components/jquery-cacheimage/jquery.cacheimage.js',
'source/components/moment/min/moment.min.js',
'source/components/fullcalendar/dist/fullcalendar.min.js',
'source/scripts/main.js'
])
.pipe(plumber())
.pipe(concat('main.js'))
.pipe(uglify())
.pipe(gulp.dest('scripts/js'))
.pipe(browserSync.reload({ stream: true }));
});