DEV Community

ax
ax

Posted on

Create a react-ts template powered by Vite

Steps:

  • Create a project with Vite.

With PNPM:

pnpm create react-ts-vite-template --template react-ts
Enter fullscreen mode Exit fullscreen mode

With NPM:

npm create react-ts-vite-template --template react-ts
Enter fullscreen mode Exit fullscreen mode
  • Change directory to your project, initialize git with:
git init
Enter fullscreen mode Exit fullscreen mode
  • Install packages using:
pnpm install

#or

npm install
Enter fullscreen mode Exit fullscreen mode
  • Run the application by using:
pnpm start dev

#or

npm start dev
Enter fullscreen mode Exit fullscreen mode
  • Once you clean up the initial setup, commit and push to a Repository.

  • Go to the Repository in Github -> Settings -> Check the box for Template Repository
    Settings -> Template Repo

  • That's it!
    Final

You can use this template to generate new Repositories with the same configs and folder struture.

Top comments (0)