Replies: 1 comment 1 reply
-
Hey! Starting to look at this today a bit — do you know if any tools support I feel like if you can't use TypeScript for your PostCSS config it doesn't feel like a huge win to be able to use it for the Tailwind config since you're still stuck with JS for the PostCSS config. Would adding proper types for the config file and a comment at the top of the generated file like this get us 95% of the benefit?
I've been playing with Next.js as well and it doesn't seem like there's any way to even use a What do you think? |
Beta Was this translation helpful? Give feedback.
-
Hey,
It's common in the front-end ecosystem, and especially around Vite, to have TypeScript configuration files. It has a few advantages:
I would love for Tailwind to have support for it. It could be implemented fairly easily, I think, thanks to
esbuild
, a project which I'm sure you're familiar with.Here is what the Vite implementation looks like: https://github.com/vitejs/vite/blob/main/packages/vite/src/node/config.ts#L975
Here is a library that makes the process easier (though I don't think it's adapted for Tailwind, I do think it's a good source to learn): https://github.com/egoist/bundle-require
I would like to try PRing this feature to Tailwind, but before I try to work on it, I'd like approval from the team that it would be welcome.
EDIT - I could have searched before dropping the Discussion, I just looked at the issues before. That said I didn't see an answer, so this still stands!
Beta Was this translation helpful? Give feedback.
All reactions