vite-plugin-css-injected-by-js

JSON →
library 5.0.1 ·javascript
verified Apr 27, 2026

A Vite plugin that injects all CSS into the JavaScript bundle at build time, eliminating separate CSS files and enabling single-file deployments. Current stable version is 5.0.1, requiring Vite >8.0.0-0 (major breaking from v4 which supported Vite 4-7). It provides a virtual module for on-demand injection and supports custom injection targets like Shadow DOM. Key differentiator: unlike Vite's default CSS extraction, it bundles styles into JS, useful for widgets, libraries, or deployments where a single JS file is preferred. Ships TypeScript types. Active development with frequent releases.

total hits 10
actors 3 distinct systems
last hit 1d ago AhrefsBot
GPTBot
5
Search engines
1
Humans
1

top countries 🇺🇸 United States · 🇨🇦 Canada · 🇬🇧 United Kingdom · VN