cra 없이 작업해보자(2)

null·2021년 12월 8일
0

git commit -m 'git init'

  1. root 폴더 생성
  2. npm init -y package.json todtjd
  3. root 폴더 아래에 src 폴더 / build 폴더 생성
  4. src / index.html 만들기
<body>
  <div id="root"></div>
</body>

git commit -m 'feat react-dom'

  1. yarn add react react-dom // yarn.lock 생성

  2. yarn add -D typescript @types/react @types/react-dom // tsconfig.json 생성

{
  "compilerOptions": {
    "target": "ES5",
    "module": "ESNext",
    "moduleResolution": "node",
    "lib": ["DOM", "ESNext"],
    "jsx": "react-jsx",
    "noEmit": true,
    "isolatedModules": true,
    "esModuleInterop": true,
    "strict": true,
    "skipLibCheck": true,
    "forceConsistentCasingInFileNames": true,
    "resolveJsonModule": true
  },
  "include": ["src/**/*"]
}

git commit -m 'feat babel webpack 설치'

  1. yarn add -D @babel/core @babel/preset-env @babel/preset-react @babel/preset-typescript // package.json 추가
  2. yarn add -D webpack webpack-cli webpack-dev-server html-webpack-plugin
profile
개발이 싫어.

0개의 댓글