🐛 fix(cors): compile shared-nestjs-cors to JavaScript for production

The shared-nestjs-cors package was exporting raw TypeScript files, which caused
runtime errors in production Docker containers:
  SyntaxError: Unexpected token 'export'

Changes:
- Add build script to compile TypeScript to JavaScript
- Update package.json to export compiled dist files instead of src
- Add build step to all backend Dockerfiles that use this package
- Package now builds to CommonJS in dist/ folder

Fixes staging deployment failures for mana-core-auth and other backends.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Wuesteon 2025-12-17 18:42:47 +01:00
parent 47881ae410
commit 74654e652a
7 changed files with 26 additions and 6 deletions

View file

@ -20,6 +20,10 @@ COPY services/mana-core-auth ./services/mana-core-auth
# Install all dependencies (including devDependencies for build)
RUN pnpm install --frozen-lockfile
# Build shared packages first
WORKDIR /app/packages/shared-nestjs-cors
RUN pnpm build
# Build the application
WORKDIR /app/services/mana-core-auth
RUN pnpm build