-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a510f5e
commit 1d4d699
Showing
8 changed files
with
601 additions
and
619 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,30 @@ | ||
import { defineConfig } from "vite"; | ||
import react from "@vitejs/plugin-react"; | ||
|
||
// https://vite.dev/config/ | ||
export default defineConfig({ | ||
plugins: [react()], | ||
base: "/", // 배포 경로를 '/'로 설정 | ||
build: { | ||
sourcemap: false, // 프로덕션 소스맵 비활성화 | ||
chunkSizeWarningLimit: 1000, // 청크 크기 제한 경고 설정 | ||
minify: "terser", // terser 사용하여 압축 | ||
terserOptions: { | ||
compress: { | ||
drop_console: true, // 콘솔 로그 제거 | ||
drop_debugger: true, // 디버거 제거 | ||
}, | ||
}, | ||
rollupOptions: { | ||
output: { | ||
manualChunks: (id) => { | ||
// 'node_modules'가 경로에 포함된 경우에만 처리 | ||
if (id.includes("node_modules")) { | ||
const segments = id.split("node_modules/"); | ||
const moduleName = segments[1]?.split("/")[0]; | ||
return `vendor/${moduleName}`; | ||
} | ||
}, | ||
}, | ||
}, | ||
}, | ||
}); |