Skip to content

Instantly share code, notes, and snippets.

@roshray
Last active November 4, 2025 20:34
Show Gist options
  • Select an option

  • Save roshray/519f73720a97b03a9edc570e17b8a609 to your computer and use it in GitHub Desktop.

Select an option

Save roshray/519f73720a97b03a9edc570e17b8a609 to your computer and use it in GitHub Desktop.
monorepo
// backend/tsconfig.json
{
"ts-node": {
"files": true,
"transpileOnly": true,
},
"compilerOptions": {
"outDir": "./dist",
"allowJs": true,
"allowSyntheticDefaultImports": true,
"downlevelIteration": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"noFallthroughCasesInSwitch": true,
"noImplicitAny": true,
"skipLibCheck": true,
"strict": true,
"sourceMap": true,
"resolveJsonModule": true,
"inlineSources": true,
"isolatedDeclarations": false,
"lib": [
"ES2021"
],
"module": "commonjs",
"moduleResolution": "Node",
"target": "es2021"
},
"include": [
"src"
]
}
// monorepo/package.json
{
"name": "monorepo",
"private": true,
"version": "0.0.0",
"scripts": {
"be": "pnpm --filter @monorepo/backend",
"fe": "pnpm --filter @monorepo/frontend",
"dev": "pnpm -r --parallel dev",
"types": "pnpm -r --parallel types"
}
}
/* monorepo/pnpm-workspace.yaml */
packages:
- backend
- frontend
// frontend/tsconfig.app.json
{
"compilerOptions": {
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
"target": "ES2022",
"useDefineForClassFields": true,
"lib": ["ES2022", "DOM", "DOM.Iterable"],
"module": "ESNext",
"types": ["vite/client"],
"skipLibCheck": true,
/* Bundler mode */
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"verbatimModuleSyntax": true,
"moduleDetection": "force",
"noEmit": true,
"jsx": "react-jsx",
/* Linting */
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true,
"noUncheckedSideEffectImports": true
},
"include": ["src"]
}
// frontend/tsconfig.json
{
"files": [],
"references": [
{ "path": "./tsconfig.app.json" },
{ "path": "./tsconfig.node.json" }
]
}
// frontend/tsconfig.node.json
{
"compilerOptions": {
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
"target": "ES2023",
"lib": ["ES2023"],
"module": "ESNext",
"types": ["node"],
"skipLibCheck": true,
/* Bundler mode */
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"verbatimModuleSyntax": true,
"moduleDetection": "force",
"noEmit": true,
/* Linting */
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true,
"noUncheckedSideEffectImports": true
},
"include": ["vite.config.ts"]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment