-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.ts
42 lines (41 loc) · 1.22 KB
/
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
37
38
39
40
41
42
import react from '@vitejs/plugin-react';
import path from 'path';
import { terser } from 'rollup-plugin-terser';
import { defineConfig } from 'vite';
// https://vitejs.dev/config/
export default defineConfig({
base: `/ts-react-redux-fetch/`,
plugins: [react()],
resolve: {
alias: {
app: path.resolve(__dirname, './src/app'),
components: path.resolve(__dirname, './src/components'),
context: path.resolve(__dirname, './src/context'),
hooks: path.resolve(__dirname, './src/hooks'),
http: path.resolve(__dirname, './src/http'),
i18n: path.resolve(__dirname, './src/i18n'),
models: path.resolve(__dirname, './src/models'),
shared: path.resolve(__dirname, './src/shared'),
store: path.resolve(__dirname, './src/store'),
styles: path.resolve(__dirname, './src/styles'),
utils: path.resolve(__dirname, './src/utils'),
},
},
build: {
minify: 'terser',
rollupOptions: {
plugins: [
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
terser({
format: {
comments: false,
},
mangle: {
keep_classnames: false,
reserved: [],
},
}),
],
},
},
});