I am using async/await code and I'm receiving a "regeneratorRuntime is not defined error". I have tried several solutions from stack overflow, but I can't get any of them to work. Here's my configuration:
webpack.config.js:
module.exports = {
entry: ['babel-polyfill', './client/libs/compileTemplate/entry.jsx', './client/libs/compileTemplate/loginEntry.jsx'],
output: {
path: '/dist',
publicPath: '/assets',
filename: '[name].js'
},
plugins: plugins,
externals: {},
module: {
loaders: require('./webpack.config.loaders')
},
...
webpack.config.loaders.js:
module.exports = [
{
test: /\.jsx$/,
loader: 'babel',
query: {
presets: ['es2015', 'stage-0', 'react'],
}
},
];
package.json: "devDependencies": { "babel-core": "^6.7.5", "babel-loader": "^6.2.4", "babel-polyfill": "^6.26.0", "babel-preset-es2015": "6.16.0", "babel-preset-react": "6.16.0", "babel-preset-stage-0": "^6.24.1", "json-loader": "^0.5.4", "less-loader": "2.2.3" }
I have also require("babel-core/register") at the top of my entry.jsx file.
Please let me know where I'm going wrong.