Boilerplate React.js + TypeScript + Vite đ
This boilerplate provides a solid foundation for building React.js applications with modern tools and best practices. It includes:
- React.js 18+ with TypeScript: Utilizes the latest React features with the benefits of static typing.
- Vite: A fast build tool for quick development and optimized production builds.
- Jest: A comprehensive testing solution for ensuring code quality.
- Eslint:
- Standard with modifications.
- React Hooks and other React configurations with eslint-config-react-app.
- Husky: Automatic lint and type-checking before every commit.
Key Features:
- SVG Imports: Import SVGs as React components.
- Media Imports: Easily import images, videos, and other media files.
- Absolute Imports: Use
@
for absolute imports from thesrc
directory.
Usage:
- Install dependencies:
yarn install
- Run the development server:
yarn dev
- Type-check in watch mode:
yarn type-check --watch
- Run tests:
yarn test
- Build for production:
yarn build
- Preview production build locally:
yarn preview