sincecutoff.com
← all changes

cdk synth --watch re-synthesizes on file changes

Introduced 2026-09-09 · score 0.98

HOW TO USE IT

When iterating on a CDK app, run `cdk synth --watch` to synthesize initially and re-synthesize when watched files change. Configure the project’s `cdk.json` with a `watch` key first.

cdk synth --watch

WHY THIS HELPS

When iterating on a CDK app, watch for file changes and regenerate the synthesized output.

REQUIREMENTS AND LIMITATIONS

  • Version: 2.1141.0
  • --watch (required): Enables watching project files and re-synthesizing on changes.
  • cdk.json: watch (required): Project configuration key required by `cdk synth --watch` to set watched files.
  • cdk.json: watch.include: Paths to include in watching; accepts a string or array of strings.
  • cdk.json: watch.exclude: Paths to exclude from watching; accepts a string or array of strings. `include` and `exclude` are not documented as mutually exclusive.
  • Prerequisite: The project’s `cdk.json` must contain a `watch` key; the commit’s integration test configures `watch.include` as `['**/*.ts']`.

FIRST-PARTY EVIDENCE

Check the installed version and the source before using it. Entry JSON

Report a problem with this card