Skip to content

ixdlabs/react-ts-vite-starter

Repository files navigation

React TypeScript template with Vite

This is a React + TypeScript boilerplate built with Vite.

What's inside?

Getting started

  1. Create the project.

    npx degit ixdlabs/react-ts-vite-starter <app-name>
  2. Access the project directory.

    cd <my-app>
  3. Initialize a git repository.

    git init
  4. Install dependencies.

    yarn
  5. Start dev server with hot reload at http://localhost:3000.

    yarn dev

Handling Environment varialbes

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.

Recommended VS Code extensions

Other commands

Lint commands

yarn lint

Build commands

yarn build

Run the app in production mode at http://localhost:3000.

yarn serve

Test commands

  • Run unit tests and watch
    yarn test:unit
  • Run unit tests with coverage
    yarn test:unit:coverage
  • Run e2e tests
    yarn test:e2e

Commit commands

yarn commit

License

This project is licensed under the MIT License.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published