Reputation: 69
why dont we now install lib such as postcss and autoprfixers with tailwind css on CRA
Now If I go to Tailwind docs for installtion of tailwind into my react app which has been created with CRA
https://tailwindcss.com/docs/guides/create-react-app
npm install -D tailwindcss
npx tailwindcss init
but if my memory serves right it used to be
npm install -D tailwindcss autoprefixer postcss
npx tailwindcss init
Upvotes: 1
Views: 428
Reputation: 4662
You are correct. According to this commit Tailwind has changed the installation guide.
They did this to discourage using CRA more since there are better tools out there to create a React app. For example Vite
From the Install Tailwind CSS with Create React App
Create React App does not support custom PostCSS configurations
When using Vite the Tailwind docs do say to install postcss
and autoprefixer
npm create vite@latest my-project -- --template react
cd my-project
npm install -D tailwindcss postcss autoprefixer
npx tailwindcss init -p
Upvotes: 1