webpack.config.js
module.exports = {
context: __dirname + \"/app\",
entry: {
javascript: \"./app.js\",
html: \"./index.html\",
},
resolve: {
I'm currently using React 0.14.3. The ReactDOM solution did not work, nor did adding the babel presets into the webpack.config.js. Basically, those solutions appear to work only if you have a single loader defined, but I had both the babel-loader as well as the react-hot loader.
What DID work was to install the babel react presets module:
npm install babel-preset-react
and then create a .babelrc file in my project directory with the following:
{
"presets": ['react']
}
This is documented at http://babeljs.io/docs/plugins/preset-react/, as pointed to by Abhinav Singi