-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvite.config.ts
36 lines (35 loc) ยท 1.14 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
import react from '@vitejs/plugin-react';
import { resolve } from 'path';
import { defineConfig } from 'vite';
import tsconfigPaths from 'vite-tsconfig-paths';
export default defineConfig({
plugins: [
react({
jsxImportSource: '@emotion/react',
babel: {
plugins: [
[
'@emotion/babel-plugin',
{
autoLabel: 'dev-only',
labelFormat: '[dirname]--[filename]--[local]___',
},
],
],
},
}),
tsconfigPaths(),
],
resolve: {
alias: [
{ find: '@/api', replacement: resolve(__dirname, 'src/api') },
{ find: '@/components', replacement: resolve(__dirname, 'src/components') },
{ find: '@/hooks', replacement: resolve(__dirname, 'src/hooks') },
{ find: '@/pages', replacement: resolve(__dirname, 'src/pages') },
{ find: '@/store', replacement: resolve(__dirname, 'src/store') },
{ find: '@/styles', replacement: resolve(__dirname, 'src/styles') },
{ find: '@/types', replacement: resolve(__dirname, 'src/types') },
{ find: '@/utils', replacement: resolve(__dirname, 'src/utils') },
],
},
});