Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How is webpack-serve different from webpack-dev-server?

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?

like image 597
serverpunk Avatar asked Mar 22 '18 00:03

serverpunk


2 Answers

+-----------------+--------------------------+----------------------+
|                 |    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

  • Official repos
  • Webpack-serve Up a Side of Whoop-Ass
  • I investigated webpack-serve which seems to be the successor of webpack-dev-server
  • Gloc (Chrome extension for line counting. All strings are considered)
  • Total section

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

like image 159
Kas Elvirov Avatar answered Nov 08 '22 10:11

Kas Elvirov


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.

like image 1
Anil Namde Avatar answered Nov 08 '22 09:11

Anil Namde