gulp-terser
gulp-terser copied to clipboard
SyntaxError: Unexpected token: keyword (function)
gulp.src(source, { base, sourcemaps })
.pipe(tsProject())
.pipe(gulpIf(!!minify, terser({ safari10: true })))
.pipe(gulp.dest(target, this.returnSourcemaps(sourcemaps)))
.on('end', () => resolve(true))
With [email protected]
& [email protected]
, got this error message.
Need help.
You can try to configure the ecma
of terser
.
Doesn't seem to work, still throwing errors.
Whether ecma
is 5
, 2015
or 2016
.
Can you post the code? It seems that the version of ecma is still too low.