79796997

Date: 2025-10-22 16:01:04
Score: 0.5
Natty:
Report link

If you have a conflicting setup between your local setup and container setup with ts, you can create a docker.tsconfig. To avoid trying to keep two different tsconfig files update to date, just have your docker version extend the local one.

Specifically:
docker.ts.config

{
  "extends": "./local.tsconfig.json",
  "compilerOptions": {
    "baseUrl": "." // change to whatever the directory difference is
  }
}

Then change the docker-compose to rename your local tsconfigs to their docker versions

docker.tsconfig -> tsconfig

tsconfig -> local.tsconfig

    volumes:
      - ./server/docker.tsconfig.json:/app/tsconfig.json
      - ./server/tsconfig.json:/app/local.tsconfig.json

This allows your docker.tsconfig to be loaded on just your container, while leaving your local setup as-is

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Pinkflamess