NestJS - exclude folder under watch mode

Under tsconfig.json include the below property immediately after exclude property

  "include": [ "src"]

Inside tsconfig.json file do what I did in the bellow sample:

{
  "compilerOptions": {
    "module": "commonjs",
    "declaration": true,
    "removeComments": true,
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "target": "es2017",
    "sourceMap": true,
    "outDir": "./dist",
    "baseUrl": "./",
    "incremental": true,
    "paths": {

    }
  },
  "exclude": [
    "node_modules",
    "dist",
    "public"   <<-- Add the folder name here to exclude from updates
  ]
}