Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Very slow tsserver #3945

Open
Malin88 opened this issue Feb 23, 2025 · 0 comments
Open

Very slow tsserver #3945

Malin88 opened this issue Feb 23, 2025 · 0 comments

Comments

@Malin88
Copy link

Malin88 commented Feb 23, 2025

I have a monorepo with two applications, the first one is a honoJS API and the second one is a nextJS application.
If I add a reference to hono in tsconfig.json to use RPC and have nice typing in the nextJS application, tsserver needs 5-10 seconds to check for errors with each change.

Based on the tsserver logs, the most time is spent on "semanticDiag". Has anyone encountered this problem?

my nextJS tsconfig.json:

{
	"extends": "@dr/typescript-config/nextjs.json",
	"compilerOptions": {
		"baseUrl": ".",
		"paths": {
			"@admin/*": ["./src/*"],
			"@dr/ui/*": ["../../packages/ui/src/*"],
			"@api/*": ["../api/src/*"]
		},
		"plugins": [
			{
				"name": "next"
			}
		]
	},
	"include": ["next-env.d.ts", "next.config.mjs", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
	"exclude": ["node_modules"],
	"references": [
		{
			"path": "../api"
		}
	]
}

and for hono:

{
  "compilerOptions": {
    "composite": true,
    "target": "ESNext",
    "jsx": "react-jsx",
    "jsxImportSource": "hono/jsx",
    "rootDir": "./src",
    "module": "ESNext",
    "moduleResolution": "Node",
    "paths": {
      "@/*": ["./src/*"]
    },
    "resolveJsonModule": true,
    "strict": true,
    "declaration": true,
    "declarationMap": true,
    "allowSyntheticDefaultImports": true,
    "esModuleInterop": true,
    "skipLibCheck": true,
    "noImplicitAny": true,
    "noUnusedLocals": true,
    "noUnusedParameters": true,
    "lib": ["ESNext"],
    "outDir": "./dist",
    "baseUrl": ".",
    "forceConsistentCasingInFileNames": true,
    "isolatedModules": true,
    "experimentalDecorators": true,
    "emitDecoratorMetadata": true,
    "noFallthroughCasesInSwitch": true
  },
  "include": ["src/**/*"],
  "exclude": ["node_modules", "dist"]
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant