I am developing a React application and have setup webpack to package my code into bundles.
However when I load my application in Chrome with React DevTools and try to modify the props of a component via the extension, it is not changing the value or re-rendering with the new value.
Below is my webpack.config.js
'use strict';
const webpack = require('webpack')
module.exports = {
entry: {
agile: './client/js/agile.jsx.js',
vendor: [
'domready',
'react',
'react-dom',
'classnames'
]
},
output: {
filename: '[name].bundle.js',
path: 'public/js',
publicPath: '/js/'
},
module: {
loaders: [
{ test: /\.js$/, exclude: /node_modules/, loader: 'babel' }
]
},
plugins: [
new webpack.optimize.DedupePlugin(),
new webpack.optimize.OccurenceOrderPlugin(true),
new webpack.optimize.CommonsChunkPlugin({names: ['vendor'], minChunks: Infinity}),
new webpack.HotModuleReplacementPlugin()
],
target: 'web',
devtool: 'source-map',
stats: {
color: true,
modules: false,
reasons: false
},
devServer: {
hot: true,
inline: true,
contentBase: './public/'
}
};
Please let me know if I am doing something wrong.
I also tried to remove the HotModuleReplacementPlugin
used above and ran my app without the webpack-dev-server
. Neither of them worked.
Versions:
- React - 15.0.1
- React DevTools - 0.14.9
- Node - v4.4.1
- Chrome - 49.0.2623.112 (64-bit) on Mac OSX