When
cssCodeSplit: false
is enabled, all CSS will be bundled into a single JavaScript file.
npm install vite-plugin-include-css --save-dev
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'
}
}
}
});
For detailed usage instructions and API references, please visit the official documentation:
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.
- Fork the repository.
- Create a new branch for your changes.
- Submit a pull request with a clear description of your changes.
This project is licensed under the MIT License.