Skip to content

Commit ec770b6

Browse files
committed
chore
1 parent 59c9990 commit ec770b6

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

docs/live_reload.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@
22

33
With `webpack-dev-server`, we can use it to auto reload web page when the code of the project changed.
44

5-
```
6-
npm install webpack-dev-server@4
7-
```
8-
95
Please edit `frontend/webpack/webpack.config.dev.js`
106

117
```js
@@ -27,8 +23,9 @@ devServer: {
2723

2824
Notes:
2925

30-
1. Remove `hot: true` from the `devServer` section
31-
1. Then you should config the `watchFiles`
26+
1. Add `watchFiles` to the `devServer` object.
3227
1. Here we tell `webpack-dev-server` to watch all `.py` and `.html` files under the `django_app` directory.
3328

29+
Run Webpack dev server with `npm run start`
30+
3431
Now if we change code in the editor, the web page will live reload, which is awesome!

0 commit comments

Comments
 (0)