tailwind.config.ts file doesn't generate after I create the project
Answered
Transvaal lion posted this in #help-forum
Transvaal lionOP
I need help with this. Please.
Answered by lucy
with Tailwind CSS V4 you now use the globals.css file to config Tailwind CSS
READ: https://tailwindcss.com/blog/tailwindcss-v4#css-first-configuration
however if you still insist to use the tailwind.config.ts file you have 2 options:
1. Create the tailwind.config.ts file yourself and then add load it in CSS using directive like :
READ: https://tailwindcss.com/docs/upgrade-guide#using-a-javascript-config-file
2. Downgrade to Tailwind V3.
This article might help (READ: https://dev.to/myogeshchavan97/lost-in-transition-how-to-downgrade-to-tailwind-css-v3-in-nextjs-and-react-9kl)
READ: https://tailwindcss.com/blog/tailwindcss-v4#css-first-configuration
however if you still insist to use the tailwind.config.ts file you have 2 options:
1. Create the tailwind.config.ts file yourself and then add load it in CSS using directive like :
@config ../../tailwind.config.ts';
READ: https://tailwindcss.com/docs/upgrade-guide#using-a-javascript-config-file
2. Downgrade to Tailwind V3.
This article might help (READ: https://dev.to/myogeshchavan97/lost-in-transition-how-to-downgrade-to-tailwind-css-v3-in-nextjs-and-react-9kl)
4 Replies
Transvaal lionOP
How can I configurate Tailwind if this file is not longer available?
yes right now when you create new next.js app (latest) it comes with Tailwind CSS V4 which doesn't ship with tailwind.config.ts file instead all the configuration is now through globals.css file
@Transvaal lion How can I configurate Tailwind if this file is not longer available?
with Tailwind CSS V4 you now use the globals.css file to config Tailwind CSS
READ: https://tailwindcss.com/blog/tailwindcss-v4#css-first-configuration
however if you still insist to use the tailwind.config.ts file you have 2 options:
1. Create the tailwind.config.ts file yourself and then add load it in CSS using directive like :
READ: https://tailwindcss.com/docs/upgrade-guide#using-a-javascript-config-file
2. Downgrade to Tailwind V3.
This article might help (READ: https://dev.to/myogeshchavan97/lost-in-transition-how-to-downgrade-to-tailwind-css-v3-in-nextjs-and-react-9kl)
READ: https://tailwindcss.com/blog/tailwindcss-v4#css-first-configuration
however if you still insist to use the tailwind.config.ts file you have 2 options:
1. Create the tailwind.config.ts file yourself and then add load it in CSS using directive like :
@config ../../tailwind.config.ts';
READ: https://tailwindcss.com/docs/upgrade-guide#using-a-javascript-config-file
2. Downgrade to Tailwind V3.
This article might help (READ: https://dev.to/myogeshchavan97/lost-in-transition-how-to-downgrade-to-tailwind-css-v3-in-nextjs-and-react-9kl)
Answer