React

[React] React-Deploy (배포)

썽연 2021. 10. 1. 22:08
728x90

React를 배포하기 위해 serve라는 명령어를 사용한다.

npm install -g serve

를 실행하면 어디서나 serve를 실행할 수 있다.

 

npx serve -s build

build를 한 파일을 serve를 하겠다.

대신 이번만 최신으로 (npm이 아닌 npx명령어이므로)

serve를 하면 용량이 줄어듦

 

728x90