Replies: 3 comments 1 reply
-
See https://tailwindcss.com/docs/detecting-classes-in-source-files#explicitly-registering-sources |
Beta Was this translation helpful? Give feedback.
-
Thank you very much. |
Beta Was this translation helpful? Give feedback.
-
I am still having trouble making custom paths work in @source. I am using nuxt + nuxt/content. This worked in v3: tailwind.config.ts export default {
content: ["./content/**/*.md", "./app/utils/**/*.ts"],
...
} Since @source "../../../content/**/*.md"; But no tailwind classes are read from markdown. Anyone got this working in nuxt? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Description:
After upgrading from Tailwind CSS v3.3.5 to v4, I've encountered issues where Tailwind no longer detects classes defined in custom directories specified in the content array of tailwind.config.js. For instance, the following configuration:
worked as expected in v3.3.5, but in v4. Tailwind fails to detect classes and any changes in the specified path. This change disrupts projects that rely on custom directory structures and explicit content paths.
Expected Behaviour:
Tailwind should respect the content array in tailwind.config.js, allowing developers to specify custom paths for class detection.
The upgrade guide should provide clear instructions on how to configure custom content paths in v4
Actual Behaviour:
Tailwind v4 ignores the content array in tailwind.config.js, leading to missing styles from custom directories.
There is a lack of documentation on how to handle custom content paths in the new configuration paradigm.
Additional context:
I am not sure which version exactly breaks this
Beta Was this translation helpful? Give feedback.
All reactions