Skip to content

add way for azd x to ignore files for commands #6152

Description

@jongio

Problem

azd x watch monitors file changes to trigger rebuilds, but it watches everything in the project directory — including files and folders that should be ignored (e.g., node_modules/, .git/, build output, test artifacts, IDE config). This causes excessive unnecessary rebuilds that slow down the inner dev loop significantly, especially in projects with many generated/transient files.

Impact

  • Constant rebuild churn: A single npm install or go build can trigger cascading rebuild cycles as output files change
  • Slow inner loop: Developers wait for rebuilds that serve no purpose
  • CPU/resource waste: File watchers fire on irrelevant changes

Proposed Solution

Add ignore file support (e.g., .azdignore or reuse .gitignore patterns) so azd x watch and similar file-monitoring commands can skip irrelevant paths.

Options to consider

  1. .azdignore file (new, azd-specific)
  2. Respect existing .gitignore patterns by default
  3. watch.exclude config in azure.yaml
  4. Combination: respect .gitignore + allow .azdignore overrides

Current Behavior

All files/folders in the project directory are monitored. No way to exclude paths.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions