I am running the following gulp task:
var gulp = require('gulp');
var uglify = require('gulp-uglify');
var rename = require('gulp-rename');
gulp.task('uglify', function(){
gulp.src('htdocs/js/*.js')
.pipe(uglify())
.pipe(rename({suffix: '.min'}))
.pipe(gulp.dest('dist'));
});
When I do so I get the following error:
GulpUglifyError: unable to minify JavaScript
Caused by: SyntaxError: Unexpected token: punc «{», expected: punc «;»
It is failing on the first line of the first JavaScript file. The line it objects to is:
import {removeScoreButtons} from './display.js';