Skip to content

Complete A-Z React Setup for Enterprise-grade Application from Scratch

Notifications You must be signed in to change notification settings

Heonys/webpack-react-enterprise

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

webpack-react-enterprise

🚀 개요

"webpack-react-enterprise"는 웹팩을 사용하여 React 어플리케이션을 구축하기 위한 저장소입니다. Create React App 혹은 Vite과 같은 번들러를 사용하면 생산성을 크게 향상시켜 주지만 Webpack을 직접 설정하고 Babel, TypeScript 등 필요한 도구들을 직접 설치하며 프로젝트를 구성하며 코드 스플리팅, 번들 최적화 등 웹팩을 직접 다루고 그 동작 원리와 설정 방법에 대한 이해도를 높일 수 있는 것을 목표로 합니다. 이를 통해 React 프로젝트에 필요한 모든 요소를 완전히 제어하면서, 더 많은 유연성과 커스터마이징 가능성을 제공합니다.

🎯 목표

  1. 웹팩을 사용하여 직접 React 어플리케이션을 구축하는 방법을 이해하고 익히기
  2. 필요한 모든 요소를 갖춘 React 애플리케이션 개발하기
  3. 웹팩 설정, Babel, TypeScript 등의 도구를 직접 설치하고 설정하여 프로젝트의 커스터마이징 가능성 확보하기
  4. enterprise 수준의 프로젝트에 필요한 기능과 구조 구현하기

🔍 Features

🎉 시작하기

저장소 복제 및 패키지 의존성 설치

git clone --depth=1 https://github.com/Heonys/webpack-react-enterprise.git my-project-name
cd my-project-name
yarn install

개발 모드에서 시작

yarn dev

브라우저에서 http://localhost:3000을 열어 확인하세요

📃 스크립트

package.json에서 다음과 같은 스크립트들이 사용이 가능합니다

  • dev: webpack 개발 서버 실행
  • build: 리액트 어플리케이션 빌드
  • serve: 빌드이후 production 환경에서 실행
  • storybook: storybook 서버 시작
  • build:storybook: storybook 서버 빌드
  • commit: commitizen으로 git commit
  • test: 테스트 실행
  • test:coverage: 테스트 커버리지 확인
  • test:e2e: cypress 실행
  • prepare: 패키지 설치시 husky가 자동으로 Git 훅을 설치
  • check-types: tsc로 타입체크

🛠️ 프로젝트 구조

.
├── README.md                       # README file
├── .husky                          # Husky configuration
├── .storybook                      # Storybook configuration
├── .yarn                           # Yarn package manager settings
├── cypress                         # Cypress E2E test
├── server                          # Express server folder 
├── public                          # Public assets folder
├── src
│   ├── api                         # HTTP request 
│   ├── atom                        # Recoil state management
│   ├── components                  # React components
│   ├── context                     # React context
│   ├── hook                        # Custom hooks
│   ├── i18n                        # i18next configuration
│   ├── mocks                       # MSW configuration
│   ├── pages                       # Page component
│   ├── routes                      # React routing 
│   ├── stories                     # Storybook story 
│   ├── test                        # Unit & Integration test
│   ├── types                       # Type definitions
│   └── util                        # Utility function

🌐 i18n

📢 express

📝 commitizen

⚙️ 환경 변수

🎲 MSW

📖 Storybook

🧪 테스트

  • 단위 테스트 및 통합테스트: yarn test을 통한 Jest 실행
  • End-to-end tests: yarn e2e을 통한 Cypress 실행