The support for HMR is now stable and you can start using it. For existing projects, you must upgrade the @adonisjs/core and the @adonisjs/assembler packages to their latest releases before you can start using the HMR mode.
This is what you need to do.
npm i -D hot-hook @adonisjs/assembler@latest
npm i @adonisjs/core@latestNext update the package.json file with the following configuration
"hotHook": {
"boundaries": [
"./app/controllers/**/*.ts",
"./app/middlewares/*.ts"
]
}And start the HTTP server as follows.
node ace serve --hmrIf you use npm scripts, then make sure to update the dev script as well in the package.json file.
{
"scripts": {
"dev": "node ace serve --hmr"
}
}Commits
Full Changelog: v6.7.1...v6.8.0