-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.ts
36 lines (34 loc) · 942 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
/// <reference types="vitest" />
/// <reference types="vite/client" />
import { defineConfig } from 'vite';
import { resolve } from 'path';
import react from '@vitejs/plugin-react';
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
base: './',
resolve: {
alias: {
'@': resolve(__dirname, 'src/'),
'@common': resolve(__dirname, 'src/common/'),
'@style': resolve(__dirname, 'src/styles/'),
'@component': resolve(__dirname, 'src/components/'),
'@doc': resolve(__dirname, 'src/doc/'),
'@icon': resolve(__dirname, 'src/icon/'),
},
},
test: {
globals: true,
environment: 'jsdom',
},
css: {
preprocessorOptions: {
less: {
additionalData: `@import "@/styles/main.less";`,
},
},
},
server: {
port: 4080,
},
});