Skip to content

tohsaka888/swc-react-template

Repository files navigation

swc-react-template

GitHub Release Date npm package NPM downloads GitHub license code style: prettier

introduction

use swc and webpack5 to build the template for your react application.

usage

you can use cli commands to create your own react application.

Usage: create-react-swc-app [options] [name]

create a project

Arguments:
  name              project name

Options:
  -ts --typescript  language
  -js --javascript  language
  -h, --help        display help for command

for example, i want to create a project named my-app and i want to use typescript:

 npx create-react-swc-app my-app -ts
⚛️   React With SWC  ⚛️
✔ 🎉🎉🎉 succeed download template! 🎉🎉🎉
? 🤔 choose a package manager (Use arrow keys)
❯ npm
  yarn
  pnpm

you can just run npx create-react-swc-app instead.

npx create-react-swc-app
? 🤔 project name? my-app
? 🤔 choose a template TypeScript
⚛️   React With SWC  ⚛️
✔ 🎉🎉🎉 succeed download template! 🎉🎉🎉
? 🤔 choose a package manager (Use arrow keys)
❯ npm
  yarn
  pnpm

now, you can see the now folder in current working space.

then, you can select the package manager to download the dependencies.

? 🤔 choose a package manager pnpm
✔ 🎉🎉🎉 success download dependencies! 🎉🎉🎉
🚀 run: cd ./my-app && pnpm dev

if you see something like this, congratulations!