报错信息以下:es6
缘由在于gulp打包时未将es6语法转为es5npm
1.首先在项目下进行安装gulp的babel转码gulp
npm install --save-dev gulp-babel babel-core babel-preset-es2015
2.此时在gulp压缩配置文件内添加以下babelbabel
var gulp = require('gulp'), babel = require("gulp-babel"); gulp.task('minjs', function () { gulp.src(src_js+'/**/*.js') .pipe(babel()) .pipe(uglify()) .pipe(gulp.dest(dest_js)); });
3.再次执行gulp便可ui