webpack-dev-middleware
webpack-dev-middleware copied to clipboard
enable use other than express
- Operating System: ubuntu
- Node Version: latest
- NPM Version: latest
- webpack Version: latest
- webpack-dev-middleware Version: latest
Feature Proposal
enable use of other backends. similar to my hacky approach here
if I could just say 'hey use this middleware instead of the default one' that would make my life really easier
thx!
Feature Use Case
i want to use koa, and koa-webpack doesnt work with webpack5
Seems fair, if there are no means already to support this, @alexander-akait what do you think?
Yes, why not, PR welcome
We already support connect, express and fastify https://github.com/webpack/webpack-dev-middleware#fastify
Yes, why not, PR welcome
will PR 👍
Don't forget to add tests :smile:
yep, any better name for option?
No need option, it is internal changes, maybe it will work already, maybe we need to use other API to get headers or something else
Example of pure API and express https://github.com/webpack/webpack-dev-middleware/blob/master/src/middleware.js#L105
you guys are awesome. @alexander-akait
im planning on testing this tonight. sorry for the delay
Hi, in my understanding, using fastify-express essentially means that you run an express server inside of fastify. I'd really like to use actual fastify. Does anyone know of any options to do this? Edit, I came across https://github.com/gajus/fastify-webpack-hot which looks promising.
I can accept PR for adding fastify here and for dev server too
We want to move webpack-dev-middleware
to webpack-dev-server
(and make it monorepo, so all packages related to dev server will be in one place), so I want to close this in favor https://github.com/webpack/webpack-dev-server/issues/4741, we still consider it (and I think we will implement this after the next major release)