1. Vite로 React PWA 시작하기

npm create @vite-pwa/pwa@latest [프로젝트 이름] --template react

Untitled

2. npm 패키지 설치

cd [프로젝트 이름]

npm i

3. SWC 세팅

https://swc.rs/docs/getting-started

.swcrc

{
 "$schema": "<https://swc.rs/schema.json>",
 "jsc": {
 "parser": {
 "syntax": "ecmascript",
 "jsx": false,
 "dynamicImport": false,
 "privateMethod": false,
 "functionBind": false,
 "exportDefaultFrom": false,
 "exportNamespaceFrom": false,
 "decorators": false,
 "decoratorsBeforeExport": false,
 "topLevelAwait": false,
 "importMeta": false
 },
 "transform": null,
 "target": "es5",
 "loose": false,
 "externalHelpers": false,
 // Requires v1.2.50 or upper and requires target to be es2016 or upper.
 "keepClassNames": false
 },
 "minify": false
}

출처: https://swc.rs/docs/configuration/swcrc/

4. Prettier, Eslint 설치 및 세팅

설치: npm install --save-dev prettier

.prettierrc.cjs