-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
@astrojs/tailwind ignores Tailwind CSS v3.3 TypeScript config #6695
Comments
Thanks @phenomen, would accept a PR if you wanted to fix this. |
it looks like tailwind 3.3 is already picked up by @astrojs/tailwind (either new project or pnpm upgrade) |
I wonder if using proload is the best solution for loading the config. I'd expect Tailwind to provide something for that |
They have. We just shipped support for this in prettier-plugin-tailwindcss: tailwindlabs/prettier-plugin-tailwindcss#137 |
I think so https://github.com/tailwindlabs/tailwindcss/blob/master/src/lib/load-config.ts can be imported like so: import loadConfig from 'tailwindcss/loadConfig' |
Gonna try make a pr now |
Tailwind does something similar so i think you need it https://github.com/tailwindlabs/prettier-plugin-tailwindcss/blob/70ea7aa55d5ecc1b9202273b4c4deb84c4d8c979/src/index.js#L180 |
Currently its all working locally ( including the build ) but for some reason in ci the build is failing and i cant work out why. If anyone has any ideas lmk :) |
So i got it all working however some of the not explicitly tailwind tests kept failing so ive given up for now. if some hero wants to take this on feel free to fork my repo or start from scratch. But i was 95% there i rekon. Its worth noting you can remove this integration and simply create a postcss config inside you astro project to make use of tialwind 3.3.0 rn. |
@FinnDore Please try my fix, it should work nicely. |
Guess you have already tried the fix in #6724? oh and to be clear i did break the tests but im not sure how to get them working again. |
I've been using my fix and it does seem to work properly. I feel like this integration was doing too much redundant work. |
Would love to have this fixed. This would give me ESM support in the tailwind config which would allow me to bring in design tokens from Style Dictionary. |
Bumping the priority on this as more and more people are using ESM / TS configs with Tailwind and we get many confused users both in other issues and in our Discord |
I’ll do it over the weekend.On 8 Jun 2023, at 08:36, Erika ***@***.***> wrote:
Bumping the priority on this as more and more people are using ESM / TS configs with Tailwind
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
What version of
astro
are you using?2.1.8
Are you using an SSR adapter? If so, which one?
None
What package manager are you using?
pnpm
Describe the Bug
When I use Tailwind CSS v3.3 TypeScript config file
tailwind.config.ts
, Astro ignores it and uses default config instead.Reference: https://tailwindcss.com/blog/tailwindcss-v3-3#esm-and-typescript-support
I think you just need to bump Tailwind dependency to use updated
resolveConfig
.Participation
The text was updated successfully, but these errors were encountered: