Skip to content

Commit

Permalink
chore: UpdatepossibleConfigFiles (#9600)
Browse files Browse the repository at this point in the history
* Add `.ts` to list of `possibleConfigFiles`

* Add more options

* Create many-rules-kick.md

* Update .changeset/many-rules-kick.md

Co-authored-by: Florian Lefebvre <[email protected]>

---------

Co-authored-by: Florian Lefebvre <[email protected]>
  • Loading branch information
Jacob Lamb and florian-lefebvre authored Jan 5, 2024
1 parent 218ea07 commit 47b951b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .changeset/many-rules-kick.md
Original file line number Diff line number Diff line change
@@ -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`.
3 changes: 3 additions & 0 deletions packages/astro/src/cli/add/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit 47b951b

Please sign in to comment.