For some reason, the nest start --watch is not watching any non-typescript assets. Even though I've followed exactly what this doc said: https://docs.nestjs.com/cli/monorepo#assets I can't seem to figure this out. I've tried in standard mode and mono-repo mode to no success. I started a new project just to demonstrate what I'm seeing.
Nest --version: 7.5.1
When running command: npm run start:dev
I would expect to see that every time I update my html files, then I should see the "incremental file change detected" message and the app reloads but nothing is happening after the initial app load. On initial app load, the files do get copied to the dist folder so thats fine but I would expect that as I'm developing and updating these files, the app should also be reloading but it only seems to work for typescript files. Am I misunderstanding what this should be doing?
Here's the nest-cli.json:
{
"collection": "@nestjs/schematics",
"sourceRoot": "src",
"compilerOptions":{
"assets": ["**/*.html"],
"watchAssets": true
}
}
Any ideas??
Your assets configuration seems to be wrong, try passing an object to the array as they do in the documentation:
"assets": [
{ "include": "**/*.html", "watchAssets": true }
]