jeudi 28 avril 2016

babel-node is not loading presets correctly

I'm trying to run a test written in es6 with babel-node --presets es2015 -- test.js (via an npm script), which gives me the error:

SyntaxError: Unexpected token import

Any ideas as to why import would be an issue? I have babel-preset-es2015 in my package.json dependencies...

Thanks in advance,
Dan

Aucun commentaire:

Enregistrer un commentaire