我正在Webpack
使用Hot Module Reloading
. 我还在开发时使用 chrome 扩展React Developer Tools
来检查反应树。当我检查页面并查看组件树时,我想查看实际组件的名称,但是,对于每个组件,名称都显示为Proxy Component
.
我可以让你知道更多关于我的细节Webpack
,但我什至在谷歌上努力寻找正确的东西来解决这个问题。
以下是我用于 webpack 的工具:
"webpack": "^1.9.6",
"webpack-dev-middleware": "^1.2.0",
"webpack-dev-server": "^1.14.1",
"webpack-hot-middleware": "^2.0.0"
webpack.config.js
var path = require('path');
var webpack = require('webpack');
module.exports = {
devtool: 'eval',
entry: [
'webpack-hot-middleware/client',
'./client/index'
],
output: {
path: path.join(__dirname, 'static'),
filename: 'bundle.js',
publicPath: '/static/'
},
plugins: [
new webpack.HotModuleReplacementPlugin(),
new webpack.NoErrorsPlugin()
],
module: {
loaders: [
{
test: /\.json$/,
loader: 'json'
},
{
test: /\.js$/,
loader: 'babel-loader',
include: path.join(__dirname, 'client'),
query: {
plugins: ['transform-runtime'],
presets: ['es2015', 'stage-0', 'react', 'react-hmre']
}
},
{
test: /\.scss$/,
loaders: ['style', 'css', 'sass']
}
]
}
};