File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change
1
+ /* eslint-disable global-require */
1
2
import React from 'react' ;
2
3
import { Route , IndexRoute } from 'react-router' ;
3
4
import App from './modules/App/App' ;
@@ -9,6 +10,16 @@ if (typeof require.ensure !== 'function') {
9
10
} ;
10
11
}
11
12
13
+ /* Workaround for async react routes to work with react-hot-reloader till
14
+ https://github.com/reactjs/react-router/issues/2182 and
15
+ https://github.com/gaearon/react-hot-loader/issues/288 is fixed.
16
+ */
17
+ if ( process . env . NODE_ENV !== 'production' ) {
18
+ // Require async routes only in development for react-hot-reloader to work.
19
+ require ( './modules/Post/pages/PostListPage/PostListPage' ) ;
20
+ require ( './modules/Post/pages/PostDetailPage/PostDetailPage' ) ;
21
+ }
22
+
12
23
// react-router setup with code-splitting
13
24
// More info: http://blog.mxstbr.com/2016/01/react-apps-with-pages/
14
25
export default (
You can’t perform that action at this time.
0 commit comments