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

Consider flipping order of tsconfig.app.json and tsconfig.vitest.json in tsconfig.json and enabling "vue.server.reverseConfigFilePriority": true #264

Open
segevfiner opened this issue May 5, 2023 · 2 comments

Comments

@segevfiner
Copy link

With:

{
  "files": [],
  "references": [
    {
      "path": "./tsconfig.node.json"
    },
    {
      "path": "./tsconfig.vitest.json"
    },
    {
      "path": "./tsconfig.app.json"
    }
  ]
}

Instead of:

{
  "files": [],
  "references": [
    {
      "path": "./tsconfig.node.json"
    },
    {
      "path": "./tsconfig.app.json"
    },
    {
      "path": "./tsconfig.vitest.json"
    }
  ]
}

And enabling "vue.server.reverseConfigFilePriority": true, Volar and the builtin TypeScript integration of VS Code correctly select tsconfig.app.json for Vue & TS files, and tsconfig.vitest.json for test files, otherwise the order is a bit messed up and you sometimes get tsconfig.vitest.json for non-test Vue & TS files.

@sodatea
Copy link
Member

sodatea commented May 6, 2023

Good idea! I didn't know such an option existed.

@oliver139
Copy link

Also about the order issue, I found that revising compilerOptions.types in tsconfig.node.json has no effect, which I believe that the property is overwritten by @vue/tsconfig/tsconfig.dom.json which is extended in tsconfig.app.json

I previously tried that to change that property and it is not working until I move it from tsconfig.node.json to tsconfig.app.json

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

3 participants