Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enable use other than express #945

Closed
noahehall opened this issue Jun 19, 2021 · 13 comments
Closed

enable use other than express #945

noahehall opened this issue Jun 19, 2021 · 13 comments

Comments

@noahehall
Copy link

noahehall commented Jun 19, 2021

  • 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

@anshumanv
Copy link
Member

Seems fair, if there are no means already to support this, @alexander-akait what do you think?

@noahehall
Copy link
Author

@alexander-akait
Copy link
Member

Yes, why not, PR welcome

@alexander-akait
Copy link
Member

We already support connect, express and fastify https://github.com/webpack/webpack-dev-middleware#fastify

@anshumanv
Copy link
Member

Yes, why not, PR welcome

will PR 👍

@alexander-akait
Copy link
Member

Don't forget to add tests 😄

@anshumanv
Copy link
Member

yep, any better name for option?

@alexander-akait
Copy link
Member

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

@alexander-akait
Copy link
Member

Example of pure API and express https://github.com/webpack/webpack-dev-middleware/blob/master/src/middleware.js#L105

@alexander-akait alexander-akait changed the title enable use of BFFs other than express enable use other than express Jul 21, 2021
@noahehall
Copy link
Author

you guys are awesome. @alexander-akait

im planning on testing this tonight. sorry for the delay

@IanVS
Copy link

IanVS commented Jun 16, 2022

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.

@alexander-akait
Copy link
Member

I can accept PR for adding fastify here and for dev server too

@alexander-akait
Copy link
Member

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 webpack/webpack-dev-server#4741, we still consider it (and I think we will implement this after the next major release)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants