Skip to content

Commit

Permalink
feat: add default exclude to tsconfigs (#11982)
Browse files Browse the repository at this point in the history
* feat: add default exclude to tsconfigs

* feat: add include
  • Loading branch information
Princesseuh authored Sep 13, 2024
1 parent f15922d commit d84e444
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
7 changes: 7 additions & 0 deletions .changeset/clean-camels-drive.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'astro': major
---

Adds a default exclude and include value to the tsconfig presets. `{projectDir}/dist` is now excluded by default, and `{projectDir}/.astro/types.d.ts` and `{projectDir}/**/*` are included by default.

Both of these options can be overridden by setting your own values to the corresponding settings in your `tsconfig.json` file.
4 changes: 3 additions & 1 deletion packages/astro/tsconfigs/base.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,7 @@
"allowJs": true,
// Allow JSX files (or files that are internally considered JSX, like Astro files) to be imported inside `.js` and `.ts` files.
"jsx": "preserve"
}
},
"exclude": ["${configDir}/dist"],
"include": ["${configDir}/.astro/types.d.ts", "${configDir}/**/*"]
}

0 comments on commit d84e444

Please sign in to comment.