This is a React + TypeScript boilerplate built with Vite.
-
Create the project.
npx degit ixdlabs/react-ts-vite-starter <app-name>
-
Access the project directory.
cd <my-app>
-
Initialize a git repository.
git init
-
Install dependencies.
yarn
-
Start dev server with hot reload at http://localhost:3000.
yarn dev
VITE_SOME_KEY=123
DB_PASSWORD=foobar
Only VITE_SOME_KEY will be exposed as import.meta.env.VITE_SOME_KEY to your client source code, but DB_PASSWORD will not.
console.log(import.meta.env.VITE_SOME_KEY) // 123
console.log(import.meta.env.DB_PASSWORD) // undefined
More information on Vite Env Variables and Modes.
yarn lint
yarn build
Run the app in production mode at http://localhost:3000.
yarn serve
- Run unit tests and watch
yarn test:unit
- Run unit tests with coverage
yarn test:unit:coverage
- Run e2e tests
yarn test:e2e
yarn commit
This project is licensed under the MIT License.