-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathvite.config.js
More file actions
28 lines (26 loc) · 776 Bytes
/
vite.config.js
File metadata and controls
28 lines (26 loc) · 776 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// vite.config.js
import { resolve } from 'path'
import { defineConfig } from 'vite'
import { libInjectCss } from 'vite-plugin-lib-inject-css'
import path from 'path'
import { fileURLToPath } from 'url'
const __filename = fileURLToPath(import.meta.url)
export default defineConfig({
plugins: [
libInjectCss() // For a simple usage
],
build: {
lib: {
// Could also be a dictionary or array of multiple entry points
entry: resolve(path.dirname(__filename), 'src/main.ts'),
name: 'nightowl',
// the proper extensions will be added
fileName: 'nightowl'
},
rollupOption: {
output: {
intro: 'import "./style.css";'
}
}
}
})