-
Notifications
You must be signed in to change notification settings - Fork 2
/
vite.config.mjs
43 lines (40 loc) · 1004 Bytes
/
vite.config.mjs
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
import { visualizer } from 'rollup-plugin-visualizer';
import { defineConfig, loadEnv } from 'vite';
import SemiPlugin from 'vite-plugin-semi-theme';
import { timestampPlugin } from './vite/viteTimestampPlugin';
export default defineConfig(({ mode }) => {
const env = loadEnv(mode, process.cwd(), '');
return {
plugins:
mode === 'production'
? [
SemiPlugin({
theme: '@semi-bot/semi-theme-easyy',
}),
timestampPlugin(env),
]
: [
SemiPlugin({
theme: '@semi-bot/semi-theme-easyy',
}),
],
resolve: {
extensions: ['.mjs', '.js', '.ts', '.jsx', '.tsx', '.json'],
},
server: {
port: 3001,
open: false,
},
build: {
chunkSizeWarningLimit: 1300,
rollupOptions: {
plugins: [
visualizer({
open: false,
filename: 'bundle-stats.html',
}),
],
},
},
};
});