-
Notifications
You must be signed in to change notification settings - Fork 134
/
vite.config.ts
45 lines (45 loc) · 913 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
44
45
import { resolve } from 'node:path'
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import dts from 'vite-plugin-dts'
import UnoCSS from 'unocss/vite'
export default defineConfig({
plugins: [
vue(),
dts({
beforeWriteFile: (filePath, content) => {
const _content = content.replace(/vue-demi/g, 'vue')
return {
filePath,
content: _content
}
}
}),
UnoCSS()
],
server: {
port: 5230
},
build: {
target: 'es2015',
lib: {
entry: resolve(__dirname, './src/index.ts'),
name: 'VueDraggablePlus',
fileName: 'vue-draggable-plus',
formats: ['es', 'umd', 'cjs', 'iife']
},
rollupOptions: {
external: ['vue'],
output: {
globals: {
vue: 'Vue'
}
}
}
},
resolve: {
alias: {
'@': resolve(__dirname, 'src')
}
}
})