2

I am trying to use the wonderful Quokka package by WallabyJS https://github.com/wallabyjs/atom-quokka.

I am trying to import an ES6 module but keep getting an error in the Quokka console:

Unexpected token import at createScript vm.js:56

I have tried updating my package.json file and set babel: true as advised in the configuration page here but i still get the error.

Link to my package.json file here

enter image description here

Jason Aller
  • 3,541
  • 28
  • 38
  • 38
Neil
  • 2,802
  • 8
  • 34
  • 49

1 Answers1

0

You need to specify react-app preset in your Quokka config, so instead of "babel: true", you need:

babel: {
    presets: ['react-app']
}
Artem Govorov
  • 903
  • 6
  • 10
  • Thanks Artem, I updated the package.json and added the above but still get the same error? Am i doing something incorrectly? Git updated Link to my https://github.com/neil-coutinho/es-gulp-babel-intern/blob/master/package.json – Neil Dec 12 '17 at 08:36