-
-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathvite.config.js
More file actions
28 lines (27 loc) · 659 Bytes
/
vite.config.js
File metadata and controls
28 lines (27 loc) · 659 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
import { resolve } from 'path'
import { defineConfig } from 'vite'
import dts from 'vite-plugin-dts'
import { codecovVitePlugin } from '@codecov/vite-plugin'
export default defineConfig({
build: {
lib: {
entry: resolve(__dirname, 'src/index.ts'),
formats: ['es'],
},
rollupOptions: {
// make sure to externalize deps that shouldn't be bundled
// into your library
external: ['@projectwallace/css-parser'],
},
},
plugins: [
dts({
rollupTypes: true,
}),
codecovVitePlugin({
enableBundleAnalysis: process.env.CODECOV_TOKEN !== undefined,
bundleName: 'analyzeCss',
uploadToken: process.env.CODECOV_TOKEN,
}),
],
})