3
我正在開發一個React應用程序,並已安裝webpack將我的代碼打包到捆綁包中。無法修改React DevTools for Chrome中的組件道具
但是,當我使用React DevTools在Chrome中加載我的應用程序並嘗試通過擴展來修改組件的道具時,它不會更改值或使用新值重新渲染。
下面是我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/'
}
};
請讓我知道,如果我做錯了什麼。
我也嘗試刪除上面使用的HotModuleReplacementPlugin
並運行我的應用程序沒有webpack-dev-server
。他們都沒有工作。
版本:
- 陣營 - 在Mac OSX 49.0.2623.112(64位) - 15.0.1
- 陣營DevTools - 0.14.9
- 節點 - v4.4.1
- 鉻
感謝您將我指向GitHub項目和PR。我認爲有一個修復但尚未發佈。 – codematix