skykkm0810 / forme

0 stars 0 forks source link

react setting #3

Open skykkm0810 opened 3 years ago

skykkm0810 commented 3 years ago

리액트 작업 세팅

  1. npx create-react-app [APPNAME] --template=typescript
  2. npm install -D tailwindcss@latest postcss@latest autoprefixer@latest
    -- tailwind , postcsss.config , autoprefixer 설치
  3. postcss.config.js 파일 생성
    module.exports = {
    plugins: {
      tailwindcss: {},
      autoprefixer: {},
    }
    }
  4. npx tailwindcss init
  5. pakage.json 수정
    "scripts": {
    "tailwind:build": "tailwind build -i ./src/tail/tailwind.css -o ./src/tail/build.css",
    "start": "npm run tailwind:build & react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test",
    "eject": "react-scripts eject"
    },

    tail/ tailwind.css 만들기

  6. npm install react-router-dom
skykkm0810 commented 3 years ago

vscode intellisense not find config.js file => wsl, ubuntu 에 다시 Extension 재설치