
Product
Introducing Reports: An Extensible Reporting Framework for Socket Data
Explore exportable charts for vulnerabilities, dependencies, and usage with Reports, Socket’s new extensible reporting framework.
vite-plugin-libcss
Advanced tools
This plugin will inject css into bundled js file using `import` statement.
This plugin will inject css into bundled js file using import statement like this:
// bundled js file, with import css at top (if any)
import './style.css';
// rest of the file
// ...
Install:
npm i vite-plugin-libcss -D
Usage:
// vite.config.js
import libCss from 'vite-plugin-libcss';
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
// any other plugins
libCss()
],
});
or with include/exclude options
// vite.config.js
import libCss from 'vite-plugin-libcss';
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
// any other plugins
libCss({
include: 'src/**/*', // Include all entry files
exclude: 'src/utils/*', // Exclude entry files in the "utils" directory
})
],
});
Note that this plugin will only work with library-mode and es format build.
FAQs
This plugin will inject css into bundled js file using `import` statement.
The npm package vite-plugin-libcss receives a total of 16,101 weekly downloads. As such, vite-plugin-libcss popularity was classified as popular.
We found that vite-plugin-libcss demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Explore exportable charts for vulnerabilities, dependencies, and usage with Reports, Socket’s new extensible reporting framework.

Product
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.