[github] 리액트 build 하는 법

0후·2023년 12월 4일
0

프론트엔드

목록 보기
41/41

https://github.com/aaa/abc.git
예) https://aaa.github.io/abc"
react build 전
package.json 에서 수정하고

{
"homepage": "https://aaa.github.io/abc",
"name": "rt",
"version": "0.1.0",
"private": true,
"dependencies": {
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^13.5.0",
"gh-pages": "^5.0.0",
"jquery": "^3.7.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router-dom": "^6.14.0",
"react-scripts": "5.0.1",
"web-vitals": "^2.1.4"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject",
"predeploy": "npm run build",
"deploy": "gh-pages -d build"
},

npm install gh-pages 설치하고

npm run deploy 하고
build>에서 git init 시작하기
git remote add origin 생성깃주소
git status
git add .
git commit -m "message"
git push origin master
==> 깃에서 퍼블리싱

profile
휘발방지

0개의 댓글