423cc / webpack-react-spa

React single page app based on webpack.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

webpack-react-spa

Webpack for spa project.

get-started:

git clone https://github.com/afeiship/webpack-react-spa.git
npm install
npm run dev

simple interface:

  • nx.$app
  • nx.$memory
  • nx.$local
  • nx.$session

deploy:

## start
cd webpack-react-spa
git pull
./deploy/production/start.sh

## check status:
docker ps

## kill
docker kill a359c42986c6

feature:

  • spa
  • react 16+
  • webpack 4.x
  • next-redux-base
  • image compress
  • fonts/images to folder
  • react-router v4
  • HtmlWebpack -> webpack favico.ico
  • ant-design optmize
  • react hmr
  • add serviceworker for app cache
  • use eslint + prettier
  • use router config
  • add dynamic import + react-imported-component

todos:

  • deploy dev/test/prd with docker
  • react hmr remove /User/xx/index.js info (NODE_ENV=development/production)
  • http when error
  • token/without token interface
  • remove build warings

some package shell:[MAC USER: use gnu-tar but not bsd-tar]

tar zcf my-project-name.tgz dist/ --transform s/dist/my-project-name/

resources:

About

React single page app based on webpack.


Languages

Language:JavaScript 86.0%Language:CSS 7.3%Language:HTML 4.7%Language:Shell 2.1%