Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc -b && vite build",
"build": "tsc -b tsconfig.app.json tsconfig.node.json && vite build",
"preview": "vite preview",
"lint": "eslint .",
"typecheck": "tsc -b --noEmit",
Expand Down
4 changes: 2 additions & 2 deletions apps/frontend/tsconfig.app.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"paths": {
"@/*": ["./src/*"]
},
"types": ["vite/client", "vitest/globals", "@testing-library/jest-dom"]
"types": ["vite/client"]
},
"include": ["src", "tests"]
"include": ["src"]
}
3 changes: 2 additions & 1 deletion apps/frontend/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"files": [],
"references": [
{ "path": "./tsconfig.app.json" },
{ "path": "./tsconfig.node.json" }
{ "path": "./tsconfig.node.json" },
{ "path": "./tsconfig.spec.json" }
]
}
36 changes: 36 additions & 0 deletions apps/frontend/tsconfig.spec.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
// Test-only TypeScript project. Split out of tsconfig.app.json so the
// PRODUCTION image build (`npm run build` -> `tsc -b tsconfig.app.json ...`)
// never type-checks tests: the contract tests import shared catalogs from
// the REPO ROOT (e.g. ../../tests/contracts/*.json), which does not exist
// inside the Docker build context (apps/frontend only) and broke the
// v0.11.0 trusca-frontend image build. CI's `npm run typecheck`
// (`tsc -b --noEmit`) still builds every referenced project, tests included.
"compilerOptions": {
"composite": true,
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.spec.tsbuildinfo",
"target": "ES2022",
"useDefineForClassFields": true,
"lib": ["ES2022", "DOM", "DOM.Iterable"],
"module": "ESNext",
"skipLibCheck": true,
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"resolveJsonModule": true,
"isolatedModules": true,
"moduleDetection": "force",
"noEmit": true,
"jsx": "react-jsx",
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true,
"noUncheckedSideEffectImports": true,
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"]
},
"types": ["vite/client", "vitest/globals", "@testing-library/jest-dom"]
},
"include": ["src", "tests"]
}
Loading