File tree Expand file tree Collapse file tree 3 files changed +9
-4
lines changed Expand file tree Collapse file tree 3 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -32,4 +32,4 @@ RUN yarn install --production
32
32
33
33
EXPOSE 5173
34
34
# 9. 서버 실행
35
- CMD ["yarn", "dev "]
35
+ CMD ["yarn", "prod "]
Original file line number Diff line number Diff line change 4
4
"version" : " 0.0.0" ,
5
5
"type" : " module" ,
6
6
"scripts" : {
7
- "dev" : " vite --host 0.0.0.0" ,
7
+ "dev" : " vite --host 0.0.0.0 --mode development" ,
8
+ "prod" : " vite --host 0.0.0.0 --mode production" ,
8
9
"build" : " vite build" ,
9
10
"lint" : " eslint ." ,
10
11
"preview" : " vite preview" ,
Original file line number Diff line number Diff line change @@ -3,7 +3,11 @@ import react from '@vitejs/plugin-react';
3
3
import svgr from 'vite-plugin-svgr' ;
4
4
import tsconfigPaths from 'vite-tsconfig-paths' ;
5
5
6
- export default defineConfig ( {
6
+
7
+ export default defineConfig ( ( { mode } ) => ( {
8
+ server : {
9
+ hmr : mode !== 'production' , // 프로덕션 환경에서만 HMR 비활성화
10
+ } ,
7
11
plugins : [
8
12
react ( ) ,
9
13
tsconfigPaths ( ) ,
@@ -16,4 +20,4 @@ export default defineConfig({
16
20
outDir : '.dist'
17
21
} ,
18
22
cacheDir : '.vite'
19
- } ) ;
23
+ } ) )
You can’t perform that action at this time.
0 commit comments