This project was based on Create React App. (#11304)
Vite-version / Unbundled Development available at vite branch (WIP)
Includes all features of CRA, with some opinionated tweaks but provide flexible configurations.
dynamic import()
, react-refresh
, modern JSX and build optimizations.react-router-dom
recoil
+ react-query
configurated as state managementframer-motion
dart-sass
), PostCSS with autoprefixer
, CSS Module
supported and optimizations.Stage 1
with tree-shaking support for ramda
, date-fns
axios
nginx
config for development and deploymenteject
(because everything is customizable by default), the rest of the scripts can be view in package.json
.browserlistrc
.vscode
folderFAST_REFRESH
option removed (Fast Refrest is always enable)DISABLE_ESLINT_PLUGIN
option removed (Eslint is always enable)ENABLE_TAILWINDCSS
addedENABLE_WDYR
addedUnfortunatelly, the project is not supported by Node v16+, due to a breaking change off v8.
git clone [email protected]:huynhducduy/react-starter-kit.git react-app
cd react-app
yarn
Clone with SSH is recommennded.
or Create a new repository from react-starter-kit
cp .env.example .env && vi .env
for local environment, also support for staging
and production
environment. Local environment will be use as fallback when staging and production environment is not available.
Alias: in tsconfig.json
- compilerOptions.paths
. Automatically resolve in webpack
, jest
environment.
Further configuration can be found in root level files.
With docker: docker-compose up --build -d
Without docker: yarn start
Configure in docker-compose.yml
file, default running on port 3000
Running test: yarn test
Debugging tests: yarn test:debug
Lint code & style: yarn lint
Fix code & style: yarn fix
Reinstall entire project: yarn refresh
Build image - by default will use yarn build:production
: sudo docker build -t react-starter-kit .
Run container: sudo docker run --init -dit -p 3000:80 --name react-starter-kit react-starter-kit:latest
Kill and remove: (sudo docker kill react-starter-kit || true) && (sudo docker rm react-starter-kit || true)
Without docker: yarn build
or yarn build:staging
or yarn build:production
, output is located at /build
Analyze output: yarn analyze
React.lazy
is not yet available for server-side rendering