I’ve created a monorepo with Turborepo that for now have 1 React Vite App, and tailwind-config package. And my problem for now is that my App is not loading tailwind at all. Let me try to explain you my project structure and files.
root
|
|- packages
| |- tailwind-config
|
`- apps
|- container
tailwind-config module contains basic package.json, tailwind.config.js and postcss.config.js files.
tailwind.config.js:
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [],
theme: {
extend: {},
},
plugins: [],
}
postcss.config.js:
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {}
}
}
Inside my container app I added tailwind-config package as the local devDependency, added Tailwind directives to my index.css.
At the end in container I created tailwind.config.cjs that looks like:
/** @type {import('tailwindcss').Config} */
const sharedConfig = require("tailwind-config/tailwind.config")
module.exports = {
...sharedConfig,
content: ["./src/**/*.{js,ts,jsx,tsx}", "./public/index.html"]
}
And postcss.config.cjs
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
}
}
As I mentioned the problem is that container app is not applying any tailwind classes I provide.
Thank you all for help in advance and hope you have nice day :)