Tailwind CSS Styles Not Applied After Adding SolidJS Routes, Why ?

I encountered an issue after integrating SolidJS routes into my project. I created components for different sections and then imported them into respective pages's compoenent like home.jsx and services.jsx and then imported them into app.jsx , Initially, styles were visible before routing, but after routing, only simple HTML pages were displayed without styling. I'm unsure about where to add routes, as I have both index.jsx and app.js. Seeking assistance to understand why Tailwind CSS is not applied after routing and how to resolve this issue and understanding why Tailwind CSS is not being applied after routing. Below is my js.config.js :
js
module.exports = {
content: [
"./src/**/*.{js,jsx,ts,tsx}",
],
theme: {
extend: {},
},
plugins: [],
}
js
module.exports = {
content: [
"./src/**/*.{js,jsx,ts,tsx}",
],
theme: {
extend: {},
},
plugins: [],
}
No description
6 Replies
REEEEE
REEEEE8mo ago
Is tailwind setup correctly? Do you have postcss setup and the tailwind css file imported?
ghost_soul0
ghost_soul0OP8mo ago
not sure i just started working with it actaully i am using tailwindcss solid.js template no , i dont have postcss setup , did that caused this issue?
REEEEE
REEEEE8mo ago
Yes, you need postcss for tailwind I've run into the same issue before
ghost_soul0
ghost_soul0OP8mo ago
ohh , can you please provide reference code or some site link to how to actaully set up postcss in solid.js ?
REEEEE
REEEEE8mo ago
Just follow the tailwind docs https://tailwindcss.com/docs/guides/solidjs
Install Tailwind CSS with SolidJS - Tailwind CSS
Setting up Tailwind CSS in a SolidJS project.
ghost_soul0
ghost_soul0OP8mo ago
dn i setup postcss and now its working , now tailwind css also applied . thank you and thank you for telling what can be the reason of the issue i was facing why tailwincss not applied .
Want results from more Discord servers?
Add your server