You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now I have multiple html files which also use tailwind css, so I create seperate css files for each of them which looks something like this:
@import"~styles/main.css";
@layer base {
body {
@apply bg-[#192144];
}
}
The problem I'm having is that vite/tailwind generates the entirety of the tailwind components for each and every file, rather than reusing the one from main.css.
How do I configure vite not to do this? I am looking to have the following generated for each of the extra css files
@import"/path/to/final/bundle-main.css";
/* whatever else tailwind wishes to generate here... */
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have a main.css file containing the base tailwind directives:
Now I have multiple html files which also use tailwind css, so I create seperate css files for each of them which looks something like this:
The problem I'm having is that vite/tailwind generates the entirety of the tailwind components for each and every file, rather than reusing the one from
main.css.How do I configure vite not to do this? I am looking to have the following generated for each of the extra css files
Is this possible?
Beta Was this translation helpful? Give feedback.
All reactions