Overview
The repository tracks a 1MB tsconfig.build.tsbuildinfo and a committed dist/ directory. Both are build outputs. Committing them produces a large diff on every build, guarantees merge conflicts that carry no semantic meaning, and — most dangerously — means a stale dist/ can be deployed by any process that runs node dist/main.js (which is exactly what start:prod does) without a fresh npm run build. A committed incremental build info file also causes TypeScript to skip recompilation based on another machine's timestamps, producing builds that differ between CI and a developer's checkout.
Specifications
Features:
- Build outputs are generated, never committed.
- Deployment always builds from source.
Tasks:
- Add
dist/ and *.tsbuildinfo to .gitignore.
- Remove both from tracking with
git rm -r --cached.
- Verify the Dockerfile builds from source rather than copying a committed
dist/.
- Add a CI check that fails if a build artifact path appears in a diff.
Impacted Files:
.gitignore
Dockerfile
package.json
Acceptance Criteria
git ls-files returns no path under dist/ and no .tsbuildinfo.
- A clean checkout plus
npm run build produces a working dist/.
- The Docker image build does not depend on a committed artifact.
- CI rejects a PR that reintroduces build outputs.
Overview
The repository tracks a 1MB
tsconfig.build.tsbuildinfoand a committeddist/directory. Both are build outputs. Committing them produces a large diff on every build, guarantees merge conflicts that carry no semantic meaning, and — most dangerously — means a staledist/can be deployed by any process that runsnode dist/main.js(which is exactly whatstart:proddoes) without a freshnpm run build. A committed incremental build info file also causes TypeScript to skip recompilation based on another machine's timestamps, producing builds that differ between CI and a developer's checkout.Specifications
Features:
Tasks:
dist/and*.tsbuildinfoto.gitignore.git rm -r --cached.dist/.Impacted Files:
.gitignoreDockerfilepackage.jsonAcceptance Criteria
git ls-filesreturns no path underdist/and no.tsbuildinfo.npm run buildproduces a workingdist/.