Skip to content

Commit 5914027

Browse files
committed
Added react-hot-loader and react-app-rewire-hot-loader
1 parent e7a4d30 commit 5914027

File tree

4 files changed

+30
-4
lines changed

4 files changed

+30
-4
lines changed

config-overrides.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
const rewireStyledComponents = require('react-app-rewire-styled-components');
2+
const rewireReactHotLoader = require('react-app-rewire-hot-loader');
23

34
module.exports = (config, env) => {
45
let overrodeConfig = Object.assign({}, config);
6+
overrodeConfig = rewireReactHotLoader(overrodeConfig, env);
57
overrodeConfig = rewireStyledComponents(config, env, {
68
displayName: true,
79
});

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"dependencies": {
66
"react": "^16.4.1",
77
"react-dom": "^16.4.1",
8+
"react-hot-loader": "^4.3.3",
89
"react-scripts": "1.1.4",
910
"styled-components": "^3.3.3"
1011
},
@@ -52,6 +53,7 @@
5253
"lint-staged": "^7.2.0",
5354
"prettier": "^1.13.7",
5455
"prh": "^5.4.3",
56+
"react-app-rewire-hot-loader": "^1.0.1",
5557
"react-app-rewire-styled-components": "^3.0.2",
5658
"react-app-rewired": "^1.5.2",
5759
"react-test-renderer": "^16.4.1",

src/App/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import React from 'react';
2+
import { hot } from 'react-hot-loader';
23
import style, { keyframes } from 'styled-components';
34
import logo from './logo.svg';
45

@@ -51,4 +52,4 @@ const App = () => (
5152
</StyledApp>
5253
);
5354

54-
export default App;
55+
export default hot(module)(App);

yarn.lock

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4683,7 +4683,7 @@ fast-json-stable-stringify@^2.0.0:
46834683
version "2.0.0"
46844684
resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2"
46854685

4686-
fast-levenshtein@~2.0.4:
4686+
fast-levenshtein@^2.0.6, fast-levenshtein@~2.0.4:
46874687
version "2.0.6"
46884688
resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917"
46894689

@@ -5156,7 +5156,7 @@ global-prefix@^1.0.1:
51565156
is-windows "^1.0.1"
51575157
which "^1.2.14"
51585158

5159-
global@^4.3.2:
5159+
global@^4.3.0, global@^4.3.2:
51605160
version "4.3.2"
51615161
resolved "https://registry.yarnpkg.com/global/-/global-4.3.2.tgz#e76989268a6c74c38908b1305b10fc0e394e9d0f"
51625162
dependencies:
@@ -9100,6 +9100,12 @@ react-addons-create-fragment@^15.5.3:
91009100
loose-envify "^1.3.1"
91019101
object-assign "^4.1.0"
91029102

9103+
react-app-rewire-hot-loader@^1.0.1:
9104+
version "1.0.1"
9105+
resolved "https://registry.yarnpkg.com/react-app-rewire-hot-loader/-/react-app-rewire-hot-loader-1.0.1.tgz#511f06d85e1c05d3ea1c3cdaede352e1871183ba"
9106+
dependencies:
9107+
webpack "^3.6.0"
9108+
91039109
react-app-rewire-styled-components@^3.0.2:
91049110
version "3.0.2"
91059111
resolved "https://registry.yarnpkg.com/react-app-rewire-styled-components/-/react-app-rewire-styled-components-3.0.2.tgz#e1acfaff2738af7ff4c4ad557ebd4599d6cda862"
@@ -9204,6 +9210,17 @@ react-fuzzy@^0.5.2:
92049210
fuse.js "^3.0.1"
92059211
prop-types "^15.5.9"
92069212

9213+
react-hot-loader@^4.3.3:
9214+
version "4.3.3"
9215+
resolved "https://registry.yarnpkg.com/react-hot-loader/-/react-hot-loader-4.3.3.tgz#37409a3341c7787563d0972007ba02521f82f5d5"
9216+
dependencies:
9217+
fast-levenshtein "^2.0.6"
9218+
global "^4.3.0"
9219+
hoist-non-react-statics "^2.5.0"
9220+
prop-types "^15.6.1"
9221+
react-lifecycles-compat "^3.0.4"
9222+
shallowequal "^1.0.2"
9223+
92079224
react-html-attributes@^1.4.2:
92089225
version "1.4.2"
92099226
resolved "https://registry.yarnpkg.com/react-html-attributes/-/react-html-attributes-1.4.2.tgz#0d2ccf134fc79b2d3543837dc1591d32b7b903f9"
@@ -10127,6 +10144,10 @@ shallowequal@^0.2.2:
1012710144
dependencies:
1012810145
lodash.keys "^3.1.2"
1012910146

10147+
shallowequal@^1.0.2:
10148+
version "1.1.0"
10149+
resolved "https://registry.yarnpkg.com/shallowequal/-/shallowequal-1.1.0.tgz#188d521de95b9087404fd4dcb68b13df0ae4e7f8"
10150+
1013010151
shebang-command@^1.2.0:
1013110152
version "1.2.0"
1013210153
resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea"
@@ -11945,7 +11966,7 @@ [email protected]:
1194511966
webpack-sources "^1.0.1"
1194611967
yargs "^8.0.2"
1194711968

11948-
webpack@^3.11.0:
11969+
webpack@^3.11.0, webpack@^3.6.0:
1194911970
version "3.12.0"
1195011971
resolved "https://registry.yarnpkg.com/webpack/-/webpack-3.12.0.tgz#3f9e34360370602fcf639e97939db486f4ec0d74"
1195111972
dependencies:

0 commit comments

Comments
 (0)