diff --git a/.changeset/many-rules-kick.md b/.changeset/many-rules-kick.md new file mode 100644 index 000000000000..9befc7fe2875 --- /dev/null +++ b/.changeset/many-rules-kick.md @@ -0,0 +1,7 @@ +--- +'astro': patch +--- + +Improves tailwind config file detection when adding the tailwind integration using `astro add tailwind` + +Tailwind config file ending in `.ts`, `.mts` or `.cts` will now be used instead of creating a new `tailwind.config.mjs` when the tailwind integration is added using `astro add tailwind`. diff --git a/packages/astro/src/cli/add/index.ts b/packages/astro/src/cli/add/index.ts index 74a4f73626f2..dcc4859f817e 100644 --- a/packages/astro/src/cli/add/index.ts +++ b/packages/astro/src/cli/add/index.ts @@ -160,6 +160,9 @@ export async function add(names: string[], { flags }: AddOptions) { possibleConfigFiles: [ './tailwind.config.cjs', './tailwind.config.mjs', + './tailwind.config.ts', + './tailwind.config.mts', + './tailwind.config.cts', './tailwind.config.js', ], defaultConfigFile: './tailwind.config.mjs',