0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-01-20 22:12:38 -05:00
astro/.changeset/old-zebras-teach.md
Florian Lefebvre 38047119ff
feat(next): better tsconfig (#11859)
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
2024-09-03 17:49:09 +02:00

807 B

astro
major

Changes the default tsconfig.json with better defaults, and makes src/env.d.ts optional

Astro's default tsconfig.json in starter examples has been updated to include generated types and exclude your build output. This means that src/env.d.ts is only necessary if you have added custom type declarations or if you're not using a tsconfig.json file.

Additionally, running astro sync no longer creates, nor updates, src/env.d.ts as it is not required for type-checking standard Astro projects.

To update your project to Astro's recommended TypeScript settings, please add the following include and exclude properties to tsconfig.json:

{
    "extends": "astro/tsconfigs/base",
+    "include": ["**/*", ".astro/types.d.ts"],
+    "exclude": ["dist"]
}