0.0.1 • Published 3 years ago

@bimdata/vite-plugin-libcss v0.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

vite-plugin-libcss

Disclaimer: This plugin is a fork from https://github.com/wxsms/vite-plugin-libcss.

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 -D @bimdata/vite-plugin-libcss

Usage:

// vite.config.js
import libCss from "@bimdata/vite-plugin-libcss";

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [
    // ... (any other plugins)
    libCss()
  ],
});

Note that this plugin will only work in library-mode with an es format build.