S
S
symblight2017-03-09 22:19:40
Node.js
symblight, 2017-03-09 22:19:40

What's the difference in webpack tools?

I have been digging into webpack for a long time and running the server through webpack-dev-server and through webpack-dev-middleware
At first I was digging with dev-server, but then I had problems in requests due to different client and server ports. Sessions were created over and over again instead of one. I solved the problem by using webpack-dev-middleware instead of webpack-dev-server. Everything worked with one address.
Here is the question itself, what is the difference between webpack-dev-server and webpack-dev-middleware ?
What and how, where to use. I googled, everyone does it differently, but I can't figure out which is better. Point out to a newbie

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim, 2017-03-09
@symblight

webpack-dev-server - a tool for convenient development of your single-page applications from webpack (that is, from the "box")
webpack-dev-middleware - actually, a middleware that adds capabilities to your other server (in the case of a question tag - written in node. js and the express framework). What does it add? Well, at least, the possibility of hot-reload'a ..
There is no difference what and where to use. Do it as you feel more comfortable. Either just webpack-dev-server, or some of your "complicated" server written in node.js + webpack-dev-server middleware. A middlewar can be understood as a kind of "amplifier", as already written, for example: strengthen my "server" on "hot-reload"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question