-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathvite.config.ts
44 lines (42 loc) · 912 Bytes
/
vite.config.ts
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/// <reference types="vitest" />
// @ts-ignore
import path from 'path'
import { defineConfig } from 'vite'
import dts from 'vite-plugin-dts'
// import { fileURLToPath } from 'url'
export default defineConfig({
build: {
lib: {
name: 'aa-js',
entry: path.resolve(__dirname, 'src/index.ts'),
fileName: 'aa-js'
}
},
plugins: [dts({
include: ['src/index.ts', 'src/**/*.ts'],
beforeWriteFile: (filePath, content) => ({
filePath: filePath.replace('/src', ''),
content
})
}
)],
resolve: {
alias: {
'@': path.resolve(__dirname, './src')
},
// alias: {
// @ts-ignore
// '@': fileURLToPath(new URL('src/', import.meta.url)),
// @ts-ignore
// '#': fileURLToPath(new URL('tests/', import.meta.url)),
// },
dedupe: [
'vue',
'lodash',
'dayjs',
],
},
test: {
globals: true
}
})