-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.js
41 lines (39 loc) · 1.12 KB
/
vite.config.js
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
import react from '@vitejs/plugin-react';
import { defineConfig } from 'vite';
const path = require('path');
export default defineConfig({
build: {
sourcemap: true,
},
publicDir: 'public',
esbuild: {
jsxInject: `import { jsx as _jsx } from 'react/jsx-runtime'`,
},
optimizeDeps: {
include: ['@emotion/react', '@emotion/react/jsx-dev-runtime'],
},
plugins: [
react({
jsxImportSource: '@emotion/react',
babel: {
plugins: ['@emotion/babel-plugin'],
},
}),
],
server: {
port: 3000,
},
resolve: {
alias: {
'@assets': path.resolve(__dirname, './src/assets'),
'@components': path.resolve(__dirname, './src/components'),
'@config': path.resolve(__dirname, './src/config'),
'@custom-types': path.resolve(__dirname, './src/types'),
'@pages': path.resolve(__dirname, './src/pages'),
'@router': path.resolve(__dirname, './src/router.tsx'),
'@services': path.resolve(__dirname, './src/services'),
'@shared-types': path.resolve(__dirname, './src/shared-types'),
'@theme': path.resolve(__dirname, './src/theme'),
},
},
});