front-end
[PWA] react에서 PWA 구현
React에서 PWA 구현하는 방법을 알아보자. 일단 create-react-app으로 react 앱을 생성할 것이다. 이때 template 옵션을 cra-template-pwa와 함께 생성하면 된다. npx create-react-app [프로젝트명] --template cra-template-pwa 타입스크립트를 지원하려면 아래와 같이 typescript를 추가로 입력하면 된다. npx create-react-app [프로젝트명] --template cra-template-pwa-typescript template cra-template-pwa 템플릿으로 생성을 하면 Google에서 PWA를 위해 만든 라이브러리인 Workbox가 미리 세팅이 되어 caching 기능을 사용할 수 있도록 만들어진다. ..
2024. 1. 9. 19:03