React + Mobx + React Router 4 + Code Splitting + WebPack 2
This project is the definitive boilerplate for people who want to use:
- React
- Mobx (or other state managment)
- React Router 4 last version
- Code Splitting for pages (vendors and commons)
- Webpack for development & real production
Capture of development Webpack Dasboard:
Capture of real Code Splitting:
For dev environments...
$ npm start
For production environments...
$ npm run build
Important:
- Code splitting is the best way to optimice your load application.
- We are using here Bundle Loader (https://github.com/webpack-contrib/bundle-loader)
- You can find more information about Code Splitting in React Router 4 Docs. (https://reacttraining.com/react-router/web/guides/code-splitting)
- We have created a Proxy to API Backend, the concept is similar to create-react-app (https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#proxying-api-requests-in-development), you can find it in /bin/server.js
Authors: @chemitaxis @alexvcasillas
More documentation soon!