pnpm i -D tailwindcss postcss autoprefixer
npx tailwindcss init -pSources:
- Manny : Quick Vitest Setup With ViteJS, React, & TypeScript
- Luke Twomey : What is Vite and Why Should You Use It Instead of Create React App?
Stack : pnpm, vite, vitest, react, typescript
- Node, npm
A simple example of a Cart to remind me the basic usage of Redux Toolkit. We need to use two features : "products" and "cart". The Products React Component displays a list of products and add it to the cart. The Cart Component displays the number of items and the total score.
File structure :
- ./main.jsx
- ./App.jsx
- ./app/store.js
Steps with Vite and React-router
- Install gh-pages :
pnpm i -D gh-pages - Add scripts to package.json:
"build-for-deploy": "tsc && vite build && cp dist/index.html dist/404.html","predeploy": "yarn run build-for-deploy","deploy": "gh-pages -d dist",
- Add homepage to package.json:
NewerOlder