Skip to content

Remove tracked build artifacts dist/ and tsconfig.build.tsbuildinfo from version control #1044

Description

@RUKAYAT-CODER

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions