Incompatible with create-react-app v2?
schester44 opened this issue · comments
Getting the following error when attempting to use this with CRA 2.0.3
config.module.rules[0].use[0].options.emitWarning = true;
^
TypeError: Cannot read property '0' of undefined
at rewireHotLoader (/Applications/MAMP/htdocs/city/node_modules/react-app-rewire-hot-loader/index.js:9:29)
config.module.rules[0]
consists of only { parser: { requireEnsure: false } }
Me too. My monkey-patch:
// node_modules/react-app-rewire-hot-loader/index.js
function rewireHotLoader(config, env) {
if (env === 'production') {
return config
}
- config.module.rules[0].use[0].options.emitWarning = true
return injectBabelPlugin(['react-hot-loader/babel'], config)
}
hate me please, thanks.
Same here