Skip to content

Support tsconfig.json with references #2457

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

Closed
hyunbinseo opened this issue Aug 5, 2024 · 1 comment
Closed

Support tsconfig.json with references #2457

hyunbinseo opened this issue Aug 5, 2024 · 1 comment

Comments

@hyunbinseo
Copy link

Description

I am trying to use multiple tsconfig files using the references field.

However, svelte-check and Svelte for VS Code do not seem to utilize the referenced project(s).

As a result, svelte-check results and error messages in VS Code editor do not match.

Reference the FIXME comments in hyunbinseo/svelte-kit-templates@85616f7

// tsconfig.json - base config
{
  "extends": "./.svelte-kit/tsconfig.json",
  "compilerOptions": { "lib": ["ES2022"] },
  "references": [{ "path": "./tsconfig.client.json" }]
}
// tsconfig.client.json - client-only config
{
  "extends": "./tsconfig.json",
  "compilerOptions": {
    "composite": true,
    "noEmit": false,
    "declaration": true,
    "emitDeclarationOnly": true,
    "lib": ["ES2020", "DOM", "DOM.Iterable"] // lower lib value in this case
  },
  "exclude": [
    "./node_modules/**",
    "./src/service-worker.js",
    "./src/service-worker.ts",
    "./src/service-worker.d.ts",
    // Exclude server files.
    "./src/lib/server/**/*.js",
    "./src/lib/server/**/*.ts",
    "./src/**/*.server.js",
    "./src/**/*.server.ts",
    "./src/**/+server.js",
    "./src/**/+server.ts"
  ]
}

Proposed solution

Support tsconfig file's references field.

https://www.typescriptlang.org/tsconfig/#references

Alternatives

No response

Additional Information, eg. Screenshots

No response

@jasonlyu123
Copy link
Member

Duplicate of #2148

@jasonlyu123 jasonlyu123 marked this as a duplicate of #2148 Aug 5, 2024
@jasonlyu123 jasonlyu123 closed this as not planned Won't fix, can't repro, duplicate, stale Aug 5, 2024
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

2 participants