Build for one Tailwind + React component takes 2 minutes! #4380
Replies: 1 comment
-
|
I'm glad to say I have resolved this issue - it was caused by my packages/tailwind-config/tailwind.config.js file. I had multiple directories listed in the content e.g. But doing this means every project that imports this config file searches every app and package each time a change is made, which causes slow builds! My mistake, I've updated here in case others come across the issue. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am using the 'with-tailwind' starter from here: https://github.com/vercel/turbo/tree/main/examples/with-tailwind
and I am having an issue with the UI package: https://github.com/vercel/turbo/tree/main/examples/with-tailwind/packages/ui
Essentially whenever I include the Tailwind CSS file in my index.tsx file, the build takes 125seconds! For example my index.tsx is:
My styles.css file is:
When the import "./styles.css"; reference is included the initial build takes 125seconds, but each subsequent change updates in milliseconds. When the styles.css file is not imported the initial build occurs in around 25ms.
The issue is related to Tailwind but this has knock on effects as it takes 2 minutes for me to be able to start developing with any project that imports these components!!!!
@nathanhammond I saw you made some updates to the project in the last few months, do you have any ideas? I am using an M1 Macbook pro, so I don't think the machine is the cause ;-)
Beta Was this translation helpful? Give feedback.
All reactions