Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add .mts and .cts config file detection #13940

Merged
merged 4 commits into from
Jul 3, 2024
Merged

Conversation

RobinMalfait
Copy link
Member

This PR will add support for detecting tailwind.config.cts and tailwind.config.mts files by default.

This PR will also remove some warnings that Node v22 was showing in the terminal when using ESM files (or TS files). If you happen to use an ESM file (.mjs) or any TS file (.ts, .cts or .mts), then we will immediately use jiti instead of first trying to require the file. Requiring these files triggers Node in logging the warning.

Fixes: #13927

@thecrypticace
Copy link
Contributor

We should probably add tests for these proving .mts and .cts config files work. e.g.

it('can use a tailwind.config.ts configuration file', async () => {

Copy link
Contributor

@thecrypticace thecrypticace left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add integration tests plz

@RobinMalfait RobinMalfait merged commit 588a822 into master Jul 3, 2024
13 checks passed
@RobinMalfait RobinMalfait deleted the fix/issue-13927 branch July 3, 2024 21:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants