fix(frontend): 프로덕션 이미지 빌드에서 테스트 타입체크 제외#399
Merged
Merged
Conversation
The v0.11.0 trusca-frontend image build failed: Dockerfile.prod runs `npm run build` (`tsc -b`), tsconfig.app.json included `tests`, and the catalog-mirror contract test imports the shared catalog JSON from the REPO ROOT (../../tests/contracts/), which does not exist inside the image build context (apps/frontend only) -> TS2307. First image build since the validation-campaign contract tests landed, so first exposure. Split the projects: tsconfig.app.json now covers src only (and drops the test-only ambient types); a new tsconfig.spec.json owns src+tests and is referenced from tsconfig.json, so CI's `npm run typecheck` (`tsc -b`) still type-checks tests exactly as before. `npm run build` builds only the app+node projects, which is all the production bundle needs. Verified: full typecheck clean, app-only tsc clean (the Docker path), contract vitest 12/12.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
v0.11.0
trusca-frontend이미지 빌드 실패 수정.원인
Dockerfile.prod의npm run build(tsc -b)가tsconfig.app.json의include: [src, tests]때문에 테스트까지 타입체크하는데, 검증 캠페인의 카탈로그 정합 테스트(catalogMirrors.test.ts)가 레포 루트tests/contracts/*.json을 import → Docker 빌드 컨텍스트(apps/frontend)엔 그 파일이 없어 TS2307. 계약 테스트가 v0.10.0 이후에 들어와 이번이 첫 이미지 빌드 노출(리네임과 무관).수정
tsconfig.app.json→src만(테스트 전용 ambient types 제거).tsconfig.spec.json(src+tests, vitest/jest-dom types) +tsconfig.jsonreferences 등재 → CInpm run typecheck(tsc -b)는 기존대로 테스트 포함.build스크립트 →tsc -b tsconfig.app.json tsconfig.node.json && vite build.검증
전체 typecheck clean · 앱 전용 tsc(Docker 경로) clean · 계약 vitest 12/12.
후속(머지 후)
v0.11.0 태그를 이 커밋으로 이동 후 release 재실행(태그 직후라 미배포·미당김, compose 기본값 0.11.0 정합 유지).