Gulp error: Unexpected token: keyword «const»
ConduciveMammal opened this issue · comments
Liam Merlyn commented
Describe the bug
I'm trying to use the NPM package along with Gulp-Uglify but the Ajaxinate package is causing a compile error:
GulpUglifyError: unable to minify JavaScript
Caused by: SyntaxError: Unexpected token: keyword «const»
If I remove import { Ajaxinate } from 'ajaxinate';
from the top of my file, it compiles fine.
Cam Gould commented
@ConduciveMammal It looks like UglifyJS doesn't support ES6 syntax, which Ajaxinate uses. Take a look at this Stack Exchange post for some options.