Next.js Discord

Discord Forum

Is there a way to hmr reload when working with a local node module?

Unanswered
Dogue Brasileiro posted this in #help-forum
Open in Discord
Dogue BrasileiroOP
I am trying to build a library for my nextjs app. But hmr doesn't work if i make changes to the local node module.

I have to rebuild the module using tsc. Stop the nextjs app, delete the .next folder. Rerun the npm run dev command.

Is everyone doing it like this? for each changes you have to take like 5 minutes to rerun the project.

This is stupid considering that other frameworks provide native support and fast hmr for developing libraries or plugins.

0 Replies