Elkfox / Ajaxinate

🎡 Ajax pagination plugin for Shopify themes

Home Page:https://ajaxinate.elkfox.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Gulp error: Unexpected token: keyword «const»

ConduciveMammal opened this issue · comments

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.

@ConduciveMammal It looks like UglifyJS doesn't support ES6 syntax, which Ajaxinate uses. Take a look at this Stack Exchange post for some options.