Answer the question
In order to leave comments, you need to log in
How to make webpack share a port with node.js?
When developing, it is necessary that layout is given for part of the url, and Node.js processes the other
Answer the question
In order to leave comments, you need to log in
Webpack itself does not listen to any ports, it simply assembles your application from many files into few files, it does not need a network for this.
The network can listen to webpack-dev-server, which is just a wrapper around express + webpack-dev-middleware.
So no one bothers you to run express yourself and put webpack-dev-middleware into it, getting the same effect + extensibility of the express application
And if you wish, get rid of express, it will be enough for you to emulate the next callback and you can pass native request and response to the middleware from http module
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question