Skip to content

Commit 8ac8205

Browse files
committed
add react-refresh
1 parent 564bbf4 commit 8ac8205

File tree

4 files changed

+66
-5
lines changed

4 files changed

+66
-5
lines changed

.babelrc

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
{
22
"presets": [
33
"react-app"
4-
]
4+
],
5+
"env": {
6+
"development": {
7+
"plugins": [
8+
"react-refresh/babel"
9+
]
10+
}
11+
}
512
}

config-overrides.js

+13-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1-
const {override, useBabelRc, useEslintRc} = require(`customize-cra`)
1+
const {
2+
addWebpackPlugin,
3+
override,
4+
useBabelRc,
5+
useEslintRc,
6+
} = require(`customize-cra`)
7+
const ReactRefreshPlugin = require('@pmmmwh/react-refresh-webpack-plugin')
28

3-
module.exports = override(useBabelRc(), useEslintRc())
9+
module.exports = override(
10+
useBabelRc(),
11+
useEslintRc(),
12+
13+
addWebpackPlugin(new ReactRefreshPlugin())
14+
)

package.json

+2
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
"zepto": "^1.2.0"
5353
},
5454
"devDependencies": {
55+
"@pmmmwh/react-refresh-webpack-plugin": "0.3.1",
5556
"@testing-library/jest-dom": "5.7.0",
5657
"@testing-library/react": "^10.0.4",
5758
"@testing-library/user-event": "^10.1.2",
@@ -62,6 +63,7 @@
6263
"eslint-plugin-prettier": "3.1.3",
6364
"prettier": "2.0.5",
6465
"react-app-rewired": "2.1.6",
66+
"react-refresh": "0.8.2",
6567
"stop-runaway-react-effects": "2.0.0"
6668
}
6769
}

yarn.lock

+43-2
Original file line numberDiff line numberDiff line change
@@ -1267,6 +1267,18 @@
12671267
resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-1.1.3.tgz#2b5a3ab3f918cca48a8c754c08168e3f03eba61b"
12681268
integrity sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw==
12691269

1270+
1271+
version "0.3.1"
1272+
resolved "https://registry.yarnpkg.com/@pmmmwh/react-refresh-webpack-plugin/-/react-refresh-webpack-plugin-0.3.1.tgz#b2e0fa57949e72f27cdfef3b0f4554edd4776240"
1273+
integrity sha512-JlbMOHNtoaLV5LR/GWpfDZht5qQqMr2E6Fcto2GcGCiVSDWN9C9wac+WNhGWaAfKh9pLOlz3EX4DkWl4Tb7sCg==
1274+
dependencies:
1275+
ansi-html "^0.0.7"
1276+
error-stack-parser "^2.0.6"
1277+
html-entities "^1.2.1"
1278+
lodash.debounce "^4.0.8"
1279+
native-url "^0.2.6"
1280+
schema-utils "^2.6.5"
1281+
12701282
"@svgdotjs/svg.js@^3.0.16":
12711283
version "3.0.16"
12721284
resolved "https://registry.yarnpkg.com/@svgdotjs/svg.js/-/svg.js-3.0.16.tgz#7044754e45daf62c8e2b115c45ca33ca5b967aff"
@@ -1921,7 +1933,7 @@ ansi-escapes@^4.2.1:
19211933
dependencies:
19221934
type-fest "^0.11.0"
19231935

1924-
1936+
[email protected], ansi-html@^0.0.7:
19251937
version "0.0.7"
19261938
resolved "https://registry.yarnpkg.com/ansi-html/-/ansi-html-0.0.7.tgz#813584021962a9e9e6fd039f940d12f56ca7859e"
19271939
integrity sha1-gTWEAhliqenm/QOflA0S9WynhZ4=
@@ -4056,6 +4068,13 @@ error-ex@^1.2.0, error-ex@^1.3.1:
40564068
dependencies:
40574069
is-arrayish "^0.2.1"
40584070

4071+
error-stack-parser@^2.0.6:
4072+
version "2.0.6"
4073+
resolved "https://registry.yarnpkg.com/error-stack-parser/-/error-stack-parser-2.0.6.tgz#5a99a707bd7a4c58a797902d48d82803ede6aad8"
4074+
integrity sha512-d51brTeqC+BHlwF0BhPtcYgF5nlzf9ZZ0ZIUQNZpc9ZB9qw5IJ2diTrBY9jlCJkTLITYPjmiX6OWCwH+fuyNgQ==
4075+
dependencies:
4076+
stackframe "^1.1.1"
4077+
40594078
es-abstract@^1.17.0, es-abstract@^1.17.0-next.1, es-abstract@^1.17.2, es-abstract@^1.17.5:
40604079
version "1.17.5"
40614080
resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.17.5.tgz#d8c9d1d66c8981fb9200e2251d799eee92774ae9"
@@ -6707,6 +6726,11 @@ lodash._reinterpolate@^3.0.0:
67076726
resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d"
67086727
integrity sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=
67096728

6729+
lodash.debounce@^4.0.8:
6730+
version "4.0.8"
6731+
resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af"
6732+
integrity sha1-gteb/zCmfEAF/9XiUVMArZyk168=
6733+
67106734
lodash.flow@^3.5.0:
67116735
version "3.5.0"
67126736
resolved "https://registry.yarnpkg.com/lodash.flow/-/lodash.flow-3.5.0.tgz#87bf40292b8cf83e4e8ce1a3ae4209e20071675a"
@@ -7147,6 +7171,13 @@ nanomatch@^1.2.9:
71477171
snapdragon "^0.8.1"
71487172
to-regex "^3.0.1"
71497173

7174+
native-url@^0.2.6:
7175+
version "0.2.6"
7176+
resolved "https://registry.yarnpkg.com/native-url/-/native-url-0.2.6.tgz#ca1258f5ace169c716ff44eccbddb674e10399ae"
7177+
integrity sha512-k4bDC87WtgrdD362gZz6zoiXQrl40kYlBmpfmSjwRO1VU0V5ccwJTlxuE72F6m3V0vc1xOf6n3UCP9QyerRqmA==
7178+
dependencies:
7179+
querystring "^0.2.0"
7180+
71507181
natural-compare@^1.4.0:
71517182
version "1.4.0"
71527183
resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7"
@@ -8895,7 +8926,7 @@ querystring-es3@^0.2.0:
88958926
resolved "https://registry.yarnpkg.com/querystring-es3/-/querystring-es3-0.2.1.tgz#9ec61f79049875707d69414596fd907a4d711e73"
88968927
integrity sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=
88978928

8898-
8929+
[email protected], querystring@^0.2.0:
88998930
version "0.2.0"
89008931
resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620"
89018932
integrity sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=
@@ -9043,6 +9074,11 @@ react-is@^16.12.0, react-is@^16.8.1, react-is@^16.8.4:
90439074
resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4"
90449075
integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==
90459076

9077+
9078+
version "0.8.2"
9079+
resolved "https://registry.yarnpkg.com/react-refresh/-/react-refresh-0.8.2.tgz#24bb0858eac92b0d7b0dd561747f0c9fd6c60327"
9080+
integrity sha512-n8GXxo3DwM2KtFEL69DAVhGc4A1THn2qjmfvSo3nze0NLCoPbywazeJPqdp0RdSGLmyhQzeyA+XPXOobbYlkzg==
9081+
90469082
90479083
version "3.4.1"
90489084
resolved "https://registry.yarnpkg.com/react-scripts/-/react-scripts-3.4.1.tgz#f551298b5c71985cc491b9acf3c8e8c0ae3ada0a"
@@ -10078,6 +10114,11 @@ stack-utils@^1.0.1:
1007810114
resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-1.0.2.tgz#33eba3897788558bebfc2db059dc158ec36cebb8"
1007910115
integrity sha512-MTX+MeG5U994cazkjd/9KNAapsHnibjMLnfXodlkXw76JEea0UiNzrqidzo1emMwk7w5Qhc9jd4Bn9TBb1MFwA==
1008010116

10117+
stackframe@^1.1.1:
10118+
version "1.1.1"
10119+
resolved "https://registry.yarnpkg.com/stackframe/-/stackframe-1.1.1.tgz#ffef0a3318b1b60c3b58564989aca5660729ec71"
10120+
integrity sha512-0PlYhdKh6AfFxRyK/v+6/k+/mMfyiEBbTM5L94D0ZytQnJ166wuwoTYLHFWGbs2dpA8Rgq763KGWmN1EQEYHRQ==
10121+
1008110122
static-extend@^0.1.1:
1008210123
version "0.1.2"
1008310124
resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6"

0 commit comments

Comments
 (0)