chore: improve use hook fail when yarn link or npm link (#22416)

* chore: improve use hook fail when yarn link or npm link

* add eslint disable rule

* use object spread
This commit is contained in:
骗你是小猫咪 2020-03-20 14:11:59 +08:00 committed by GitHub
parent 7da82dc196
commit c9927b9b8d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -134,6 +134,10 @@ module.exports = {
if (isDev) {
// eslint-disable-next-line
config.devtool = 'source-map';
// Resolve use react hook fail when yarn link or npm link
// https://github.com/webpack/webpack/issues/8607#issuecomment-453068938
config.resolve.alias = { ...config.resolve.alias, react: require.resolve('react') };
}
alertBabelConfig(config.module.rules);