-
Notifications
You must be signed in to change notification settings - Fork 186
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
feat: add tailwind.config.ts support #483
Conversation
Thank you @harlan-zw I am not 100% sure about supporting From what I see, when running /** @type {import('tailwindcss').Config} */
module.exports = {
// ...
} What do you think of it? |
I would love to see this PR happen, I have the same feeling as @harlan-zw, seeing a .js file with Tailwind supports configuration typing via JSDoc type hints, but I think TypeScript looks way more natural in a Nuxt 3 project. |
I've removed the decorator from the PR to simplify the changes, swapped the types to use the official tailwind ones and made the doc clearer around the conventions. Given that the module already supports typescript without this change, I think it's worthwhile documenting it for users and making it slightly easier for them if this is their preference. I also think it's a matter of time before tailwind has a typescript config. I'll leave it with you @atinux, happy either way |
Much cleaner! Will merge and release thank you @harlan-zw PS: nice new profile picture BTW! |
π Linked issue
n/a
β Type of change
π Description
This exists for two reasons:
This change introduces a way to define the config in typescript. While technically you could have typescript working if you provided your own
configPath
, it wasn't intuitive.The changes are fairly minimal as the
requireModule
usesjiti
already behind the scenes. I've documented the code for other nuances.π Checklist