Skip to content

[bug] Generated tsconfig.conf from create-tauri-app for Svelte + Typescript has errors #876

Description

@aaronshenhao

I created a new Tauri app (2.0) with Svelte and Typescript, but the generated tsconfig.json seems to be extending a tsconfig.json that does not exist (Tauri uses Vite by default).

Output:

user@nodejs:/workspace$ npm create tauri-app@latest
Need to install the following packages:
create-tauri-app@4.5.9
Ok to proceed? (y) y


> npx
> create-tauri-app

✔ Project name · example
✔ Identifier · com.example.app
✔ Choose which language to use for your frontend · TypeScript / JavaScript - (pnpm, yarn, npm, deno, bun)
✔ Choose your package manager · npm
✔ Choose your UI template · Svelte - (https://svelte.dev/)
✔ Choose your UI flavor · TypeScript

Template created! To get started run:
  cd noteapp
  npm install
  npm run tauri android init

For Desktop development, run:
  npm run tauri dev

For Android development, run:
  npm run tauri android dev

The following setup produces a project with this tsconfig.json:

{
  "extends": "./.svelte-kit/tsconfig.json", // <- Does not exist!
  "compilerOptions": {
    "allowJs": true,
    "checkJs": true,
    "esModuleInterop": true,
    "forceConsistentCasingInFileNames": true,
    "resolveJsonModule": true,
    "skipLibCheck": true,
    "sourceMap": true,
    "strict": true,
    "moduleResolution": "bundler"
  }
  // Path aliases are handled by https://kit.svelte.dev/docs/configuration#alias
  // except $lib which is handled by https://kit.svelte.dev/docs/configuration#files
  //
  // If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes
  // from the referenced tsconfig.json - TypeScript does not merge them in
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions