-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathvite.config.ts
36 lines (32 loc) · 967 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
import { fileURLToPath, URL } from 'node:url';
import { defineConfig, loadEnv } from 'vite';
import vue from '@vitejs/plugin-vue';
import VueI18nPlugin from '@intlify/unplugin-vue-i18n/vite';
import { resolve, dirname } from 'node:path';
// https://vitejs.dev/config/
export default defineConfig(({ mode }) => {
process.env = { ...process.env, ...loadEnv(mode, process.cwd()) };
return {
plugins: [
vue(),
VueI18nPlugin({
defaultSFCLang: 'yml',
include: resolve(dirname(fileURLToPath(import.meta.url)), './src/locales/**'),
}),
],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url)),
},
},
build: {
rollupOptions: {
input: {
main: resolve(__dirname, 'index.html'),
warma2023: resolve(__dirname, 'event/warma2023/index.html'),
yyc2024: resolve(__dirname, 'event/yyc2024/index.html'),
},
},
},
};
});