When I required theme.config.js IN tailwind.config.js, then failed to compile.
See original GitHub issueFailed to compile.
./app/javascript/stylesheets/application.scss (./node_modules/css-loader/dist/cjs.js??ref--7-1!./node_modules/postcss-loader/src??ref--7-2!./node_modules/sass-loader/dist/cjs.js??ref--7-3!./app/javascript/stylesheets/application.scss)
Module build failed (from ./node_modules/postcss-loader/src/index.js):
SyntaxError
(2:2) `@apply` cannot be used with `.text-gray-600` because `.text-gray-600` either cannot be found, or its actual definition includes a pseudo-selector like :hover, :active, etc. If you're sure that `.text-gray-600` exists, make sure that any `@import` statements are being properly processed *before* Tailwind CSS sees your CSS, as `@apply` can only be used for classes in the same CSS tree.
1 | body {
> 2 | @apply font-sans text-sm leading-normal text-gray-600;
| ^
3 | }
4 |
Everything is JUST the same as “https://github.com/hawezo/tailwindcss-theming/blob/master/docs/setup.md”, But it just failed.
So how can I get it work.
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Getting Compile Error When Adding @tailwindcss/ui Plugin to ...
Then moved on to adding the @tailwindcss/ui plugin to my tailwind.config.js file, instead of the CDN. Now I'm getting a compile error: ERROR...
Read more >Configuration - Tailwind CSS
The theme section is where you define your color palette, fonts, type scale, border sizes, breakpoints — anything related to the visual design...
Read more >Why am I getting this error (Tailwind + Next.js ... - Stack Overflow
It looks like that there is a particular class in one of your components that is breaking the css. The error is occurring...
Read more >How to use Tailwind CSS in React to configure Create React ...
We demonstrate how to get Tailwind CSS working inside a CRA-based React project without having to eject Create React App.
Read more >The complete guide to customizing a Tailwind CSS theme
config.js is used for Tailwind CSS theme customization. We will add our colors, fonts and other settings there. But first we need to...
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 FreeTop 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
Top GitHub Comments
@hawezo Looking forward for that. Thanks for your work!
Unfortunately not yet but this is something that I plan to do! See the other opened issue.