forked from moon-studio/vite-vue-bpmn-process
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.ts
31 lines (30 loc) · 826 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
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import vueJsx from '@vitejs/plugin-vue-jsx'
import { createSvgIconsPlugin } from 'vite-plugin-svg-icons'
import * as path from 'path'
// https://vitejs.dev/config/
export default defineConfig({
base: process.env.NODE_ENV === 'production' ? './' : '/',
resolve: {
alias: {
'@': path.resolve(__dirname, 'src/'),
'vue-i18n': 'vue-i18n/dist/vue-i18n.cjs.js',
types: path.resolve(__dirname, 'types/')
}
},
server: {
port: 80
},
plugins: [
vue(),
vueJsx({}),
createSvgIconsPlugin({
// 指定需要缓存的图标文件夹
iconDirs: [path.resolve(process.cwd(), 'src/bpmn-icons')],
// 指定symbolId格式
symbolId: '[name]',
customDomId: '__svg__icons__dom__'
})
]
})