Skip to content

Hot Module Replacement (HMR)

Enable HMR while loading routes:

await app.loadRoutes({
directory: 'routes',
matchersDirectory: 'matchers',
hmr: {
enabled: true,
directory: 'routes',
matchersDirectory: 'matchers',
},
});

Notes:

  • HMR is disabled in NODE_ENV=production
  • Route hook files (_hooks.js / _hooks.ts) are not hot-reloaded
  • For hook changes, restart the server