-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.ts
More file actions
35 lines (35 loc) · 1.12 KB
/
vite.config.ts
File metadata and controls
35 lines (35 loc) · 1.12 KB
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
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react-swc';
import fs from 'fs';
import mkcert from 'vite-plugin-mkcert';
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react(), mkcert()],
build: {
chunkSizeWarningLimit: 1000, // build 오류 방지
},
base: '/',
server: {
https:
process.env.VITE_DEVELOPMENT === 'true'
? {
// 개발 환경에서만 https 적용
key: fs.readFileSync('./localhost-key.pem'),
cert: fs.readFileSync('./localhost.pem'),
}
: undefined,
},
resolve: {
alias: [
{ find: '@', replacement: '/src' },
// { find: '@components', replacement: '/src/components' },
// { find: '@styles', replacement: '/src/styles' },
// { find: '@pages', replacement: '/src/pages' },
// { find: '@utils', replacement: '/src/utils' },
// { find: '@hooks', replacement: '/src/hooks' },
// { find: '@api', replacement: '/src/api' },
// { find: '@assets', replacement: '/src/assets' },
// { find: '@public', replacement: '/public' },
],
},
});