[v4] Using build time environment variables in tailwind #16626
Replies: 3 comments
-
|
I need to handle exactly the same case. |
Beta Was this translation helpful? Give feedback.
-
|
Any luck with finding a solution? Seems like it was a set backward by removing the feature of reading .env files for easy configuration. |
Beta Was this translation helpful? Give feedback.
-
|
This is the main reason we still have our js config. We have safelist and specific files that are included in dev but not in production. I don't understand how thousands of people haven't commented on this? Does everyone just include all of their storybook files in prod?? @wongjn Please take a look. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I want to create my project once and apply it to multiple, diverse environments. The environments are differentiated based on environment variables. For example, I will probably have a "primary"/"secondary" colour scheme which applies to all projects but the actual colours depend on the client they are for.
In previous versions of tailwindcss, one could use environment variables in the
tailwindcss.configfile but the new direction seems to be to move away from this file so it's not clear to me how to handle this use case now. I saw that CSS has anenv()function but this seems to be something for run time and what I need is at compile time.How is the best way to handle this use case now?
Beta Was this translation helpful? Give feedback.
All reactions