Skip to content

A React boilerplate powered by Vite, React-Router, Typescript, VItest, Testing-Library, Styled-Components and Storybook

Notifications You must be signed in to change notification settings

adeonir/boilerplate-react-vite

Repository files navigation

A developer siting in front of a computer

Boilerplate: Vite + React


This is a React boilerplate using Vite Builder.

What is inside?

Getting Started

Make a copy:

npx degit adeonir/boilerplate-react-vite my-project

Enter the new created folder, initiate a git repository and install the dependencies:

cd my-project
git init
yarn install

Development

Run the development server:

yarn dev

Open http://localhost:3000 with your browser to see the page.

Production

If you like to try the production build, run:

yarn build

And then:

yarn preview

Commands

  • dev: runs your application on localhost:3000
  • build: creates the production build version
  • preview: starts a simple server with the build production code
  • test: runs vitest in watch mode
  • test:coverage: runs vitest returning coverage table
  • test:ci: runs vitest once in CI
  • lint: runs the linter in all components and pages
  • format: runs prettier to format all components and pages
  • typecheck: runs the type checker in all components and pages
  • storybook: runs storybook on localhost:6006
  • storybook:build: create the build version of storybook
  • generate: runs plop to generate component files

Made with ♥️ by Adeonir Kohl