-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.ts
More file actions
37 lines (35 loc) · 821 Bytes
/
vite.config.ts
File metadata and controls
37 lines (35 loc) · 821 Bytes
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
import react from '@vitejs/plugin-react';
import { defineConfig, loadEnv } from 'vite';
import UnoCSS from 'unocss/vite';
import checker from 'vite-plugin-checker';
import tsconfigPaths from 'vite-tsconfig-paths';
const res = loadEnv(process.env.NODE_ENV!, process.cwd());
console.log(
`%c res >>> 🦁️ <<< ${new Date().toLocaleString()} `,
'background-color: #6bc047; color: #fff; border-radius:7px; font-size:14px; padding: 4px',
res,
process.env.NODE_ENV,
process.cwd()
);
export default defineConfig({
build: {
outDir: 'dist',
assetsDir: 'static',
},
plugins: [
UnoCSS(),
react(),
tsconfigPaths(),
checker({
typescript: true,
}),
],
server: {
port: 6800,
},
css: {
modules: {
generateScopedName: '[hash:8]-[path]-[local]',
},
},
});