- Notifications
You must be signed in to change notification settings - Fork0
devslane/vite-react-redux-tailwind-boilerplate
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This is aReactJS +Vite boilerplate to be used withTailwindcss,Redux.
This project uses many tools like:
Create the project.
npx degit https://github.com/devslane/vite-react-redux-tailwind-boilerplate my-app
Access the project directory.
cd my-app
Install dependencies.
yarn
Serve with hot reload athttp://localhost:3000.
yarn run dev
Change the title of the webpage
- Go to
index.html
- Change the text in
title
tag
- Go to
How to use .env variables ?
Add env variables to .env file (use .env.[development/production] as per your current environment)
Use
VITE_
prefix to your env variables to let vite compiler know that these variables can be publicly accessed.This is as per personal choice. Use a separate env constant file to export the env variables. (Vite uses not a good to eye method to use the env variables :) ). See example below
constENV_CONFIG={BACKEND_URL:import.meta.env.VITE_BACKEND_URL!};exportdefaultENV_CONFIG;
About
Resources
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Uh oh!
There was an error while loading.Please reload this page.