-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.js
38 lines (35 loc) · 1023 Bytes
/
vite.config.js
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
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import Components from 'unplugin-vue-components/vite';
import { AntDesignVueResolver } from 'unplugin-vue-components/resolvers';
import path from 'path'
import { createServer } from 'vite'
import { log } from 'console';
// https://vitejs.dev/config/
export default defineConfig({
plugins: [vue(),
Components({
resolvers: [
AntDesignVueResolver({
importStyle: false, // css in js
}),
],
}),
],
server: {
headers: {
'Cross-Origin-Opener-Policy': 'same-origin',
'Cross-Origin-Embedder-Policy': 'require-corp'
}
},
extensions: [".js", ".ts", ".tsx", ".jsx"],
resolve: {
alias: {
// '@components': join(root, '/components'),
'@': path.resolve(__dirname, './src') //在任何模块文件内部,可以使用__dirname变量获取当前模块文件所在目录的完整绝对路径。
}
},
optimizeDeps: {
exclude: ['@ffmpeg/ffmpeg', '@ffmpeg/util']
},
})