Skip to content

Vite setup that functions like cra with eslint, prettier, typescript and tailwind

Notifications You must be signed in to change notification settings

mustaqeemtariq/cra-vite-setup

Repository files navigation

Drop-in Replacement for CRA but powered by Vite

Things in CRA, supported here:

  • Import SVG's directly as React Component via SVGR
  • Unit Testing via Jest & React Testing Library
  • ESLint Rules & Prettier
  • Tailwind
  • Absolute imports within src directory

Tech Stack - Overview

  • Vite
  • React - Typscript
    • react-error-boundary
  • npm

Editor Config

  • vscode settings & extension recommendations
  • .editorconfig file

Lint and Formatting

  • Eslint & Prettier Configured
  • Lints
    • react
    • react hooks
    • typescript

Styling

  • TailwindCSS v3

Other Recommended Libraries:

Forms

  • React Hook Form
  • Yup (for validations)

Routing

  • React-Router-Dom
  • React Location

Date Manipulation

  • Dayjs
  • date-fns
  • Luxon

HTTP Client

  • Ky
  • Axios

Global Store (full-blown / lite-version)

  • Redux Toolkit / Zustand
  • Recoil / Jotai
  • Mobx / Valtio
  • xstate / robot

Server State

  • React Query
  • SWR
  • RTKQuery