react-swc-kits

Opinionated Fullstack React SWC toolkits featuring project generation, dev server, build production bundle, and common devtools. (WIP)

MIT License

Stars
6

react-swc-kits

Opinionated Fullstack React SWC toolkits featuring project generation, dev server, build production bundle, and common devtools.

Inspired by react-scripts from create-react-app

If you just start learning React, please try create-react-app

Why not create-react-app?

  • You want to house your own toolkit for your startup/company, with lots of opinionated customization
  • You want full control of your build configuration, but in a manner of reusable toolkits (e.g. react-scripts, kcd-scripts)

Requirement

  • Node >= 14

Main features

  • SWC
  • SSR (Server-side rendering)
  • Universal Code-splitting (lazy + eager)
  • Full HMR (Hot module reload)
  • Data prefetching
  • DLL ready for faster rebuild
  • PWA ready

Tech stacks

React pnpm React Helmet Async Express
TBC Microbundle SWC Jest

Structure

The project consists of following packages:

They're managed by pnpm so you don't need to do stuff manually (linking, etc) :D

Getting started

npx react-kits init myapp

Contributing

# First, clone the repo
# then install
pnpm i

# Bootstrap packages
pnpm run bootstrap

# build server (first time, or as needed)
pnpm run build:server

# Ready to develop locally!
pnpm run temp:dev

# Build and serve local
pnpm run temp:build
pnpm run temp:servelocal

Release packages

npm run release

# This will run `build` script for each package before release

License

MIT