Skip to content

Commit be4a785

Browse files
committed
Add example into docs for patch order. Mention webpack guide in docs.
1 parent 6606942 commit be4a785

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ If you'd rather stay with **Browserify**, check out **[LiveReactload](https://gi
3636

3737
## Known limitations
3838

39-
- React Router v3 is not fully supported. If you want to get most of React Hot Loader, consider switching to [React Router v4](https://reacttraining.com/react-router/). If you want to understand the reasoning, it's good to start in [React Router v4 FAQ](https://github.com/ReactTraining/react-router/blob/v4/README.md#v4-faq)
39+
- React Router v3 is not fully supported. If you want to get most of React Hot Loader, consider switching to [React Router v4](https://reacttraining.com/react-router/) (Note: it's currently in beta!). If you want to understand the reasoning, it's good to start in [React Router v4 FAQ](https://github.com/ReactTraining/react-router/blob/v4/README.md#v4-faq)
4040

4141
## The Talk
4242

@@ -55,6 +55,8 @@ If something doesn't work, in 99% cases it's a configuration issue. A missing op
5555

5656
Check out the [docs directory](docs).
5757

58+
You can also check out a great [webpack guide to React hot module replacement](https://webpack.js.org/guides/hmr-react/).
59+
5860
## Got Questions?
5961

6062
[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/gaearon/react-hot-loader?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

docs/README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,19 @@
2828
}
2929
```
3030

31-
- 'react-hot-loader/patch' should be placed at the top of the `entry` section in your Webpack config. An error will occur if any app code runs before `react-hot-loader/patch` has, so put it in the first position (note: if you use any polyfills then it should go right after them).
31+
- 'react-hot-loader/patch' should be placed at the top of the `entry` section in your Webpack config. An error will occur if any app code runs before `react-hot-loader/patch` has, so put it in the first position. However, if you're using polyfills put them before patch:
32+
33+
```js
34+
{
35+
entry: {
36+
'app': [
37+
'babel-polyfill',
38+
'react-hot-loader/patch',
39+
'./src/index'
40+
]
41+
}
42+
}
43+
```
3244

3345
- `<AppContainer/>` is a component that handles module reloading, as well as error handling. The root component of your app should be nested in AppContainer as a child. When in production, AppContainer is automatically disabled, and simply returns its children.
3446

0 commit comments

Comments
 (0)