Skip to content

tsconfig.json generated by SvelteKit dev server incorrectly includes parents directory #8898

@wvhulle

Description

@wvhulle

Describe the bug

When a custom files.routes option is specified in the svelte.config.js file, the "include" section of the generated tsconfig file in the .svelte-kit folder is instantiated with globs referencing parent directories.

It get entries like this:

		"../../../../../**/*.js",
		"../../../../../**/*.ts",
		"../../../../../**/*.svelte",

Instead of the expected "../src/" or "../routes/". I think this is slowing down my editor and I don't know how to fix this, because the file is autogenerated by default everytime I run the dev server.

Reproduction

https://github.com/wvhulle/sveltekit-parent-directory-bug

Logs

No response

System Info

System:
    OS: Linux 5.15 Linux Mint 21.1 (Vera)
    CPU: (8) x64 11th Gen Intel(R) Core(TM) i5-1145G7 @ 2.60GHz
    Memory: 3.22 GB / 15.36 GB
    Container: Yes
    Shell: 3.5.1 - /usr/bin/fish
  Binaries:
    Node: 19.4.0 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 9.2.0 - /usr/local/bin/npm
  Browsers:
    Chromium: 109.0.5414.74
    Firefox: 109.0
  npmPackages:
    @sveltejs/adapter-auto: ^1.0.0 => 1.0.2 
    @sveltejs/kit: ^1.0.0 => 1.3.10 
    svelte: ^3.54.0 => 3.55.1 
    vite: ^4.0.0 => 4.1.1 


### Severity

blocking all usage of SvelteKit

### Additional Information

_No response_

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions