vite/playground/lib/vite.css-code-split.config.js
Bjorn Lu 61cbf6f2cf
feat(lib)!: use package name for css output file name (#18488)
Co-authored-by: 翠 / green <green@sapphi.red>
2024-10-30 09:13:01 +01:00

17 lines
400 B
JavaScript

import { fileURLToPath } from 'node:url'
import { defineConfig } from 'vite'
export default defineConfig({
build: {
cssCodeSplit: true,
lib: {
entry: [
fileURLToPath(new URL('src/css-entry-1.js', import.meta.url)),
fileURLToPath(new URL('src/css-entry-2.js', import.meta.url)),
],
name: 'css-code-split',
},
outDir: 'dist/css-code-split',
},
})