File tree 4 files changed +1921
-1311
lines changed
4 files changed +1921
-1311
lines changed Original file line number Diff line number Diff line change 1
1
const { override, disableEsLint, addBabelPlugin } = require ( 'customize-cra' ) ;
2
+ const rewireReactHotLoader = require ( 'react-app-rewire-hot-loader' ) ;
2
3
3
- module . exports = override (
4
- disableEsLint ( ) ,
5
- addBabelPlugin ( 'styled-components' ) ,
6
- addBabelPlugin ( [
7
- 'inline-react-svg' ,
8
- {
9
- ignorePattern : 'desert'
10
- }
11
- ] )
12
- ) ;
4
+ module . exports = ( config , env ) => {
5
+ config = override ( disableEsLint ( ) ,
6
+ addBabelPlugin ( 'styled-components' ) ,
7
+ addBabelPlugin ( [
8
+ 'inline-react-svg' ,
9
+ {
10
+ ignorePattern : 'desert'
11
+ }
12
+ ] ) ) ( config , env ) ;
13
+ config = rewireReactHotLoader ( config , env ) ;
14
+ return config ;
15
+ } ;
Original file line number Diff line number Diff line change 10
10
"react-dom" : " ^16.8.6" ,
11
11
"react-dom-confetti" : " ^0.1.1" ,
12
12
"react-hanger" : " ^2.0.0" ,
13
+ "react-hot-loader" : " ^4.12.15" ,
13
14
"react-pose" : " ^4.0.8" ,
15
+ "rodal" : " ^1.7.0" ,
14
16
"styled-components" : " ^4.3.2" ,
15
17
"styles-debugger" : " ^0.0.5"
16
18
},
39
41
"babel-plugin-styled-components" : " ^1.8.0" ,
40
42
"customize-cra" : " ^0.2.13" ,
41
43
"prettier" : " ^1.18.2" ,
42
- "react-app-rewired" : " ^2.1.3" ,
43
- "react-scripts" : " ^3.0.1" ,
44
+ "react-app-rewire-hot-loader" : " ^2.0.1" ,
45
+ "react-app-rewired" : " ^2.1.4" ,
46
+ "react-scripts" : " ^3.2.0" ,
44
47
"typescript" : " ^3.5.2"
45
48
}
46
49
}
Original file line number Diff line number Diff line change @@ -4,6 +4,8 @@ import { useBoolean } from 'react-hanger';
4
4
import { ThemeProvider } from 'styled-components' ;
5
5
import themes from 'styles/themes' ;
6
6
import { useToggleBodyClass } from '../utils/hooks' ;
7
+ import { hot } from 'react-hot-loader/root' ;
8
+ import { isDev } from 'utils/dev-prod' ;
7
9
8
10
const Root = ( ) => {
9
11
const isAnimationDone = useBoolean ( false ) ;
@@ -17,4 +19,4 @@ const Root = () => {
17
19
) ;
18
20
} ;
19
21
20
- export default Root ;
22
+ export default isDev ? hot ( Root ) : Root ;
You can’t perform that action at this time.
0 commit comments