React: Tailwind CSS 3 doesn't work
See original GitHub issueCurrent Behavior
If you try to add TailwindCSS to a React project, the tailwind styles are never generated when serving or buildings.
Expected Behavior
- Tailwind styles are applied
Steps to Reproduce
- Create a new workspace
- Add the react plugin
- Create a new react application
- Follow the instructions at: https://nx.dev/l/r/guides/using-tailwind-css-in-react
- Note, using the new
content
key instead ofpurge
- Note, using the new
- Serve the app
Failure Logs
- No failure logs
Environment
Node : 14.18.1
OS : darwin x64
yarn : 1.22.17
nx : 13.3.6
@nrwl/angular : undefined
@nrwl/cli : 13.3.6
@nrwl/cypress : 13.3.9
@nrwl/devkit : 13.3.9
@nrwl/eslint-plugin-nx : 13.3.9
@nrwl/express : undefined
@nrwl/jest : 13.3.9
@nrwl/linter : 13.3.9
@nrwl/nest : undefined
@nrwl/next : undefined
@nrwl/node : undefined
@nrwl/nx-cloud : undefined
@nrwl/react : 13.3.9
@nrwl/react-native : undefined
@nrwl/schematics : undefined
@nrwl/tao : 13.3.6
@nrwl/web : 13.3.9
@nrwl/workspace : 13.3.6
@nrwl/storybook : 13.3.9
@nrwl/gatsby : undefined
typescript : 4.4.4
rxjs : 6.6.7
---------------------------------------
Community plugins:
Issue Analytics
- State:
- Created 2 years ago
- Comments:11 (3 by maintainers)
Top Results From Across the Web
tailwindcss not working in create-react-app - Stack Overflow
In your .js/.jsx where you want to use the Tailwindcss ... tailwind docs didn't work for me, then I just went to. tailwind.config...
Read more >Install Tailwind CSS with Create React App
Install tailwindcss and its peer dependencies via npm, and then run the init command to generate both tailwind.config.js and postcss.config.js .
Read more >How to use TailwindCSS with react | by Kyosuke Ito
As I would like to use TailwindCSS, I tried to introduce my app and I found ... your opacity like rgb(255, 255, 255,...
Read more >Tailwindcss Suggestions not working in react-app : WEB-48464
Tailwindcss Suggestions not working in react-app · make sure that the following files exist: node_modules/tailwindcss/tailwind.css and node_modules/. · if you use ...
Read more >How to add Tailwind into a React project in under a minute
The worst thing that could happen while not working tailwind CSS code is if you forget to include the generated CSS file in...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
It works for me. I guess you forgot adding a glob pattern for your app.
Could the docs be updated to reflect tailwind 3? Right now it’s installing the latest version but the instructions, and generated config files, are wrong.
This is the config that works for me: