You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+21-5Lines changed: 21 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,28 @@
1
1
# webpack-dev-server
2
2
3
-
**THIS SERVER SHOULD BE USED FOR DEVELOPMENT ONLY!**
3
+
Use [webpack](http://webpack.github.io) with a development server that provides live reloading. This should be used for **development only**.
4
4
5
-
**DO NOT USE IT IN PRODUCTION!**
5
+
It uses [webpack-dev-middleware](https://github.com/webpack/webpack-dev-middleware) under the hood, which provides fast in-memory access to the webpack assets.
6
6
7
-
It's a live reloading server for [webpack](http://webpack.github.io).
The easiest way to use it is with the CLI. In the directory where your `webpack.config.js` is, run:
16
+
17
+
```
18
+
node_modules/.bin/webpack-dev-server
19
+
```
20
+
21
+
This will start a server, listening on connections from `localhost` on port `8080`.
22
+
23
+
Now, when you change something in your assets, it should live-reload the files.
24
+
25
+
See [**the documentation**](http://webpack.github.io/docs/webpack-dev-server.html) for more use cases and options.
10
26
11
27
## Inspiration
12
28
@@ -20,7 +36,7 @@ Run the relevant [examples](https://github.com/webpack/webpack-dev-server/tree/m
20
36
21
37
When making a PR, keep these goals in mind:
22
38
23
-
- The communication library (Sock.js) should not be exposed to the user.
39
+
- The communication library (`SockJS`) should not be exposed to the user.
24
40
- A user should not try to implement stuff that accesses the webpack filesystem, because this lead to bugs (the middleware does it while blocking requests until the compilation has finished, the blocking is important).
25
41
- It should be a development only tool (compiling in production is bad, one should precompile and deliver the compiled assets).
26
42
- There are hooks to add your own features, so we should not add less-common features.
0 commit comments