Skip to content

Inline styles from css-modules in bundle #18780

Discussion options

You must be logged in to vote

Found it: https://github.com/marco-prontera/vite-plugin-css-injected-by-js
This plugin solved all my needs.

@thexeos your specific need of having an inlining threshold isn't supported by this plugin.
As I understand, it operates on the resulting Vite's output, not on particular source files. So if Vite decided to concat all your css in one file, there is nothing to do about it.
If you know the way to address this behavior, then maybe this option can help you.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by Andrey-Bobukh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants