15

webpack-serve: https://github.com/webpack-contrib/webpack-serve

webpack-dev-server: https://github.com/webpack/webpack-dev-server

They both state they're a dev server for webpack. How are they different?

Kas Elvirov
  • 7,394
  • 4
  • 40
  • 62
serverpunk
  • 10,665
  • 15
  • 61
  • 95

2 Answers2

20
+-----------------+--------------------------+----------------------+
|                 |    webpack-dev-server    |    webpack-serve     |
+-----------------+--------------------------+----------------------+
| Initial release | 23 Dec 2014              | 12 feb 2018          |
| Total releases  | 74                       | 7                    |
| Github stars    | 3449                     | 231                  |
| Lines of code   | 28301                    | 16075                |
| under the hood  | Express.js (22047 lines) | Koa.js (8913 lines)| |
| API             | not aligned              | API first            |
| Mode            | active (support, update) | deprecated (mar 2018)|
| Total           | work slower but supports | fast alternative     |
|                 |   old browsers           |                      |
+-----------------+--------------------------+----------------------+

Sources

https://www.reddit.com/r/javascript/comments/7pg2rq/webpackdevserver_is_now_in_maintenance_mode/dsgwxjd/?st=jf286v37&sh=0336089c

Kas Elvirov
  • 7,394
  • 4
  • 40
  • 62
  • 5
    Webpack-serve is now deprecated [sept 18, 2018](https://github.com/webpack-contrib/webpack-serve/commit/edaf28c6c935c3e29d26dbb02a9d6b672cc5148a). Webpack-dev-server is in support and update mode again. – apollo Oct 31 '18 at 12:07
1

I have not used webpack-serve but by looking at documents initial take is that it is relatively new repo (7 releases againest webpack-dev-server 70+) and focus is to use a browsers native WebSocket to fetch assets instead of polling mechanism. My guess is that would obviously make webpack-serve work better and faster while working in dev mode than webpack-dev-server.

This made curious about it. I would give it a try on my current setup and will try to get back with findings.

Anil Namde
  • 6,452
  • 11
  • 63
  • 100
  • Did you try it? What's your experiences? It seems it can do much more than webpack-dev-server... – szegheo Sep 13 '18 at 23:19