# @tsconfig/svelte

> A base TSConfig for working with Svelte.

Latest version **5.0.8** (published 2026-02-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install @tsconfig/svelte
pnpm add @tsconfig/svelte
yarn add @tsconfig/svelte
bun add @tsconfig/svelte
```

## Health

**Score 55/100 (C)** — status: stable.

Positive: no vulnerabilities; has provenance; high maintenance score.

Warnings: low downloads; no types; no esm support.

## Facts

| | |
|---|---|
| Version | 5.0.8 |
| Published | 2026-02-17 |
| First published | 2020-06-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 7876 |
| Maintainers | orta, typescript-deploys |
| Keywords | tsconfig, svelte |

## Links

- npm: https://www.npmjs.com/package/@tsconfig/svelte
- Repository: https://github.com/tsconfig/bases
- Homepage: https://github.com/tsconfig/bases#readme
- Issues: https://github.com/tsconfig/bases/issues
- npm.io page: https://npm.io/package/@tsconfig/svelte

## Alternatives

- [jsforce](https://npm.io/package/jsforce.md) — 851.2K weekly downloads
- [react-native-qrcode-svg](https://npm.io/package/react-native-qrcode-svg.md) — 693.5K weekly downloads
- [@salesforce/plugin-data](https://npm.io/package/@salesforce/plugin-data.md) — 394.9K weekly downloads
- [@backstage/plugin-search-common](https://npm.io/package/@backstage/plugin-search-common.md) — 308.5K weekly downloads
- [@chain-registry/types](https://npm.io/package/@chain-registry/types.md) — 38.4K weekly downloads

## Recent versions

- 5.0.8 (latest) — 2026-02-17
- 5.0.7 — 2026-02-04
- 5.0.6 — 2025-11-13
- 5.0.5 — 2025-08-22
- 5.0.4 — 2024-03-27
- 5.0.3 — 2024-03-24
- 5.0.2 — 2023-08-23
- 5.0.1 — 2023-08-22
- 5.0.0 — 2023-06-28
- 4.0.1 — 2023-03-28
- 4.0.0 — 2023-03-27
- 3.0.0 — 2021-12-17
- 2.0.1 — 2021-06-02
- 2.0.0 — 2021-06-01
- 1.0.13 — 2021-05-28
- … 13 more at https://npm.io/package/@tsconfig/svelte/versions

## README

### A base TSConfig for working with Svelte.

Add the package to your `"devDependencies"`:

```sh
npm install --save-dev @tsconfig/svelte
yarn add --dev @tsconfig/svelte
```

Add to your `tsconfig.json`:

```json
"extends": "@tsconfig/svelte/tsconfig.json"
```

> **NOTE**: After `@tsconfig/svelte@2.0.0`, you should add `/// <reference types="svelte" />` to a `d.ts` or a `index.ts`(entry) file to prevent typescript error.

---

The `tsconfig.json`: 

```jsonc
{
  "$schema": "https://www.schemastore.org/tsconfig",
  "_version": "5.0.0",

  "compilerOptions": {
    "module": "esnext",
    "moduleResolution": "bundler",
    "target": "es2017",
    /**
      Svelte Preprocess cannot figure out whether you have a value or a type, so tell TypeScript
      to enforce using `import type` instead of `import` for Types.
     */
    "verbatimModuleSyntax": true,
    /**
      To have warnings/errors of the Svelte compiler at the correct position,
      enable source maps by default.
     */
    "sourceMap": true,

    "strict": true,
    "esModuleInterop": true,
    "skipLibCheck": true
  }
}

```

You can find the [code here](https://github.com/tsconfig/bases/blob/master/bases/svelte.json).

---
_Source: https://npm.io/package/@tsconfig/svelte · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
