Skip to content

Latest commit

 

History

History

vite-plugin-include-css

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

vite-plugin-include-css

npm package

build css into individual js files instead of using css links. Vite >= 3.1

NPM version NPM Downloads

Installation

npm install vite-plugin-include-css --save-dev

Usage

import { defineConfig } from 'vite';
import includeCSS from 'vite-plugin-include-css';

export default defineConfig({
  plugins: [
    includeCSS()
  ],
  build: {
    cssCodeSplit: false,
    rollupOptions: {
      output: {
        manualChunks: undefined,
        assetFileNames: 'assets/[name][extname]',
        entryFileNames: '[name].js',
        format: 'iife'
      }
    }
  }
});

Examples