Open anonrig opened 1 year ago
+1 on this, would improve startup times alot and the middleware apis are very similar if i recall.
@alexander-akait - thoughts?
We do have similar plans as mentioned in https://github.com/webpack/webpack-dev-server/issues/4303. However, this is not yet prioritized. We will gladly accept a PR.
@ScriptedAlchemy Fully agree, but we should start with https://github.com/webpack/webpack-dev-middleware, now we have compatibility using fastify-express
, but will be great to be more native here, I don't have deep experience, so I will be glad to get help here https://github.com/webpack/webpack-dev-middleware/issues/945#issuecomment-1157548145, do you want to help with dev middle and when we can do it here too :smile:
@alexander-akait Is there a specific reason to keep support for Express? I don't see the point of supporting Express.js since it might create unnecessary abstraction and maintenance burdens.
@anonrig for dev server we don't need it, but webpack-dev-middleware should, because it is used for custom dev servers and we should support as much as possible, otherwise some developers will be angry :smile:
Personally, I prefer to just use node core http
with router@2.0.0-beta.1
for the routing. Great performance, and supports express-compatible middleware.
@silverwind And you're right too, I think the best solution would be an abstract API, it takes time, but allow to use very fast and any other solutions.
Somebody want to try it (I will help), I personally think this is the right direction.
Fixed:
connect
compatibility HTTP server frameworks - https://github.com/webpack/webpack-dev-server/pull/5156Now we have tests only for express and connect I will add router
and fastify
and also add a http2 supports
In the next major release we will migrate from express
to connect
or router
Feature Proposal
I recommend migrating to Fastify rather than using Express. The performance impact will be 7x (according to fastify readme), and I think it would be a lot beneficial for everybody.
Feature Use Case
I didn't understand why I need to write my system information while proposing a feature, but...