I am able to transpile ES6 with babel but when I tried to test generators, I got this exception. Uncaught ReferenceError: regeneratorRuntime is not defined
I looked around and found out that I have to add bable-generator and runtime plugins. I added them as you can see from package.json but still getting this error.
I am running babel cli "npm run watch" which compiles my code and I can run it in the browser. I have a feeling that I am missing a step :)
{
"devDependencies": {
"babel-cli": "^6.14.0",
"babel-plugin-transform-regenerator": "^6.14.0",
"babel-plugin-transform-runtime": "^6.15.0",
"babel-preset-es2015": "^6.14.0"
},
"scripts": {
"build": "babel src -d output",
"watch": "babel src --watch -d output"
},
"dependencies": {
"babel-polyfill": "^6.13.0",
"babel-runtime": "^6.11.6"
}
}
{
"presets": ["es2015"]
}