Skip to content
/ base-vite-react Public template

Typescript/Vite/React project with tanstack-query, react-router, and tailwind.

Notifications You must be signed in to change notification settings

ariym/base-vite-react

Repository files navigation

base-vite-react

Getting Started Steps

git clone https://github.com/ariym/base-vite-react project-name
cd project-name
git remote remove origin
npm i

Usage

Import Path Shortcut for /src

import from '@/dir_or_filename' makes is easy to import universal components inside nested directories

Downloading new UI components

  1. Find a component on ui.shadcn.com/docs/components
  2. npx shadcn-ui@latest add component-name

Environment Variables

  1. Inside of project root run:
    • cp env.template .env.development.local
    • cp env.template .env.production.local
  2. Prefix every variable with VITE_ (VITE_SOMETHING=xxx)
  3. Import with import.meta.env.VITE_SOMETHING

Vite Documentation on env files.

Enviroment MODE

Instead of NODE_ENV, use import.meta.env.MODE by passing vite --mode MODE at startup.

Note to AVOID passing NODE_ENV= at startup which can get confusing as documented here.

Libraries Included

  • react query
  • react router
  • shadcn
  • radix-ui/react-icons
  • vite

About

Typescript/Vite/React project with tanstack-query, react-router, and tailwind.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published