Skip to content

[v4.1] Missing Classes with Vite – Styles not applied in dynamically loaded components #18677

Answered by WaPasc
WaPasc asked this question in Help
Discussion options

You must be logged in to vote

The @source rule didn't work. I have uninstalled @tailwindcss/vite and installed tailwind again, but now using npm install -D tailwindcss@3 postcss autoprefixer. This seems to have fixed the problem.

Another way was to safelist all the styles I use with @source inline("") in the index.css file, but this is too much to manager for my use case.

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@WaPasc
Comment options

@wongjn
Comment options

wongjn Aug 5, 2025
Collaborator

@WaPasc
Comment options

@WaPasc
Comment options

Answer selected by WaPasc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants