From 996500d0f325e6715c05eb3949d8dd9a0459a411 Mon Sep 17 00:00:00 2001 From: Princesseuh <3019731+Princesseuh@users.noreply.github.com> Date: Fri, 13 Sep 2024 01:36:41 +0200 Subject: [PATCH 1/2] feat: add default exclude to tsconfigs --- packages/astro/tsconfigs/base.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/astro/tsconfigs/base.json b/packages/astro/tsconfigs/base.json index f1394474d441..86783ed3b544 100644 --- a/packages/astro/tsconfigs/base.json +++ b/packages/astro/tsconfigs/base.json @@ -27,5 +27,6 @@ "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"] } From e58f7ad153c3a5d1dd32a12eef1f7a1f4b4fff92 Mon Sep 17 00:00:00 2001 From: Princesseuh <3019731+Princesseuh@users.noreply.github.com> Date: Fri, 13 Sep 2024 16:23:33 +0200 Subject: [PATCH 2/2] feat: add include --- .changeset/clean-camels-drive.md | 7 +++++++ packages/astro/tsconfigs/base.json | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 .changeset/clean-camels-drive.md diff --git a/.changeset/clean-camels-drive.md b/.changeset/clean-camels-drive.md new file mode 100644 index 000000000000..4e908a28b9ff --- /dev/null +++ b/.changeset/clean-camels-drive.md @@ -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. diff --git a/packages/astro/tsconfigs/base.json b/packages/astro/tsconfigs/base.json index 86783ed3b544..55adf57bb5e4 100644 --- a/packages/astro/tsconfigs/base.json +++ b/packages/astro/tsconfigs/base.json @@ -28,5 +28,6 @@ // 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"] + "exclude": ["${configDir}/dist"], + "include": ["${configDir}/.astro/types.d.ts", "${configDir}/**/*"] }