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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

HMR of server side with webpack / rspack #5098

Open
2 tasks done
felixmosh opened this issue Oct 15, 2023 · 3 comments
Open
2 tasks done

HMR of server side with webpack / rspack #5098

felixmosh opened this issue Oct 15, 2023 · 3 comments

Comments

@felixmosh
Copy link
Contributor

Prerequisites

  • I have written a descriptive issue title
  • I have searched existing issues to ensure the feature has not already been requested

馃殌 Feature Proposal

Hi,
There is any way to hot module reload server side that is based on fastify? is it possible to replace fastify plugin with other module at runtime?

Motivation

Allowing hot module replacement of fastify plugins (routes / hooks etc) when the app is bundled with Webpack / Rspack.

Example

No response

@mcollina
Copy link
Member

Not right now.
Platformatic offers an hot reloading solution without the use of bundlers.

Most maintainers of Fastify recommend to not bundle your server side code, so no one worked on this specific problem.

@felixmosh
Copy link
Contributor Author

Can you share on how would you do that?

For Express, this line does the trick, https://github.com/felixmosh/rspack-express-js/blob/master/src/index.ts#L10

@mcollina
Copy link
Member

Can you share on how would you do that?

I have no idea, it's likely 1-2 days of work to figure it out.

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

2 participants