Files
sb-front/vite.config.js
T
ByungCheol 15222c1971
CI / build (push) Failing after 14m35s
@
chore: 번들 청크 경고 한도 상향 — 마크다운 에디터는 라우트 지연 로딩

- toast-ui 에디터(~1MB)는 게시판 작성/상세에서만 동적 로딩되어 메인 번들과 분리됨
- 의도된 지연 청크이므로 chunkSizeWarningLimit 1200 으로 현실화

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@
2026-06-06 15:04:15 +09:00

41 lines
1.1 KiB
JavaScript

import { fileURLToPath, URL } from 'node:url'
import { readFileSync } from 'node:fs'
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import vueDevTools from 'vite-plugin-vue-devtools'
// 앱 버전 정보(설정 > 앱 버전)에 노출 — package.json 을 단일 출처로 사용
const pkg = JSON.parse(readFileSync(new URL('./package.json', import.meta.url), 'utf-8'))
// https://vite.dev/config/
export default defineConfig({
define: {
__APP_VERSION__: JSON.stringify(pkg.version),
},
build: {
// 마크다운 에디터(toast-ui ~1MB)는 게시판 작성/상세 라우트에서만 동적 로딩되어
// 메인 번들에 포함되지 않는다. 의도된 지연 청크이므로 경고 한도를 현실적으로 상향.
chunkSizeWarningLimit: 1200,
},
plugins: [
vue(),
vueDevTools(),
],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url))
},
},
server: {
port: 5173,
proxy: {
// /api 로 시작하는 요청을 Spring Boot(8080)로 프록시
'/api': {
target: 'http://localhost:8080',
changeOrigin: true,
},
},
},
})