vite-plugin-include-css
TypeScript icon, indicating that this package has built-in type declarations

6.0.0 • Public • Published

vite-plugin-include-css

npm package

When cssCodeSplit: false is enabled, all CSS will be bundled into a single JavaScript file.

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'
      }
    }
  }
});

Documentation

For detailed usage instructions and API references, please visit the official documentation:

👉 View Full Documentation

Contributing

We welcome contributions from the community! If you find a bug or want to suggest an improvement, feel free to open an issue or submit a pull request.

How to Contribute

  1. Fork the repository.
  2. Create a new branch for your changes.
  3. Submit a pull request with a clear description of your changes.

License

This project is licensed under the MIT License.

Package Sidebar

Install

npm i vite-plugin-include-css

Weekly Downloads

15

Version

6.0.0

License

MIT

Unpacked Size

10.1 kB

Total Files

6

Last publish

Collaborators

  • fengxinming