Start your next project easily
Default aliases:
@ -> src/@components -> src/components- Custom components@assets -> src/assets- App assests@routes -> src/routes- App routes
The following packages / files are included
- Vite
- TypeScript
- EsLint
- typescript-eslint
- react-router v6
- A preconfigured .eslintrc file
Clone this repository
npx degit GabrielCrackPro/react-vite-ts-starter <app_name>
Run this command in the root directory
- Install with npm
mpm install
- Install with yarn
yarn
- Start your project:
yarn devornpm run dev - Show all eslint problems
yarn lintornpm run lint
For other commands see the package.json file
- Go to the tsconfig.json file and add this
- Go to the vite.config.ts file and add this
plugins: [
react(),
alias({
entries: [
{ find: "@", replacement: path.resolve(__dirname, "src") },
{ find: "@assets", replacement: path.resolve(__dirname, "src/assets") },
{ find: "@components", replacement: path.resolve(__dirname, "src/components") },
{ find: "@routes", replacement: path.resolve(__dirname, "src/routes") },
/*
Alias example:
{ find: "@example", replacement: path.resolve(__dirname, "src/example") },
*/
],
});
]If the
componentsfolder or theinterfacesfolder are not empty remove the.gitkeepfile