-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Classes of react components not being added to styles.css #100
Comments
Hi @hanspoo, I'm not sure I understood the problem. You shouldn't see any new styles automatically generated in your styles.css file (unless you manually build and output there yourself which you don't need to do). TailwindCSS includes styles based on the Do you have TailwindCSS and daisyUI installed, and your tailwind config setup like the README? If you've done all of that, could you post your |
If i add node_modules/react-daisyui/dist/react-daisyui.cjs in tailwind.config.js, like this:
I got this error: Failed to compile ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[2].oneOf[8].use[1]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[2].oneOf[8].use[2]!./src/pages/styles.css styles.css
|
postcss.config.js
|
package.json
|
Thanks for including the package.json! That was very helpful. Everything was working when recreating your example until I copy/pasted your package.json — maybe some mixture of packages contained in there leads to the error you're getting? Using your package.json I was able to remove all errors using this fix: For your tailwind.config.js, use this: module.exports = {
content: [
'pages/**/*.{js,ts,jsx,tsx}',
'components/**/*.{js,ts,jsx,tsx}',
'node_modules/react-daisyui/dist/react-daisyui.cjs',
'node_modules/daisyui/dist/**/*'
],
theme: {
extend: {}
},
plugins: [require('daisyui')]
} You can delete the line that says Here's a repo for the test app based on your configs that's working on my end. Let me know if everything looks right to you and if there's still issues: |
Thank you Benji, it works, tried to pach my project with the fix, didn't work, so i ended up using your project. |
Thank you for this thread! the key was:
|
Thanks 🙏
El dom, 23 de oct. de 2022 7:12 p. m., Michael Angelo <
***@***.***> escribió:
… Thank you for this thread! the key was:
'node_modules/react-daisyui/dist/react-daisyui.cjs',
'node_modules/daisyui/dist/**/*'
—
Reply to this email directly, view it on GitHub
<#100 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFEQ473SSK6GFALC2HQHS3WEWZ5DANCNFSM5T7F3BEA>
.
You are receiving this because you modified the open/close state.Message
ID: ***@***.***>
|
Hi,
Thanks for this project, is really cool, i have a problem with the nextjs integration, i've noticed the classes of the react components are not being scaned, becuase they're not being added to the global styles.css tailwind file, not static not jit, it seems that its because the component library is not being scanned for the new tailwind classes they need, ¿ any ideas ?
Thanks, Hans
The text was updated successfully, but these errors were encountered: