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 f1394474d441..55adf57bb5e4 100644 --- a/packages/astro/tsconfigs/base.json +++ b/packages/astro/tsconfigs/base.json @@ -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}/**/*"] }