Skip to content

Commit 07be5b8

Browse files
Merge pull request #329 from ShipFriend0516/fix/build
[Fix] 빌드에러 수정, vendor 파일로 리액트 라이브러리 별도의 청크 파일 분리
2 parents 0355eee + 3511aab commit 07be5b8

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

frontend/vite.config.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,10 @@ export default defineConfig({
3232
},
3333
build: {
3434
rollupOptions: {
35-
external: ["react", "react-dom"],
3635
output: {
37-
globals: {
38-
react: "React",
39-
"react-dom": "ReactDOM",
36+
manualChunks: {
37+
"vendor-react": ["react", "react-dom", "react-router-dom"],
38+
"vendor-utils": ["lodash", "axios"],
4039
},
4140
},
4241
},

0 commit comments

Comments
 (0)