18 lines
327 B
TypeScript
18 lines
327 B
TypeScript
|
/// <reference types="vitest" />
|
||
|
|
||
|
import { defineConfig } from 'vite'
|
||
|
|
||
|
export default defineConfig(({ mode }) => {
|
||
|
return {
|
||
|
build: {
|
||
|
target: 'es2020',
|
||
|
lib: {
|
||
|
entry: 'src/index.ts',
|
||
|
formats: ['es', 'cjs'],
|
||
|
},
|
||
|
sourcemap: true,
|
||
|
emptyOutDir: mode === 'production',
|
||
|
},
|
||
|
}
|
||
|
})
|