Code Splitting React Webpack Save

An example of how to code split with Webpack 2 and React Router

Project README

Code Splitting with React Router v3 and Webpack 2/3

An example of how to code split a React application using Webpack 2/3 and React Router v3.

Live Demo

Guide

There is an easy to follow guide to help you fully understand the concepts.

Step-by-step guide

Installation and Starting

git clone https://github.com/brotzky/code-splitting-react-webpack.git && cd code-splitting-react-webpack
yarn
yarn start
> visit localhost:3000

# or npm
npm install
npm start
> visit localhost:3000

Technology

The technology used for this example:

  • React
  • React Router v3
  • Webpack 2 or 3
  • Babel

Directory

The content you should focus on to get a better idea of what is going on.

code-splitting/
|   package.json
|
└───src/
│   │
│   └───modules/
│   |     Core.js
│   |     ...
│   |
│   └───root/
│   |     index.js
│   |
│   └───routes/
│   |     index.js
│   │ 
│   │ index.html
│   │ index.js
│   
│   
└───webpack/
      webpack-dev-server.js
      webpack.config.js

React Router v4

The React Router docs have a simple guide for code splitting

Made by Dennis Brotzky. If you need help please file an issue or contact me through twitter!
Open Source Agenda is not affiliated with "Code Splitting React Webpack" Project. README Source: brotzky/code-splitting-react-webpack
Stars
135
Open Issues
0
Last Commit
6 years ago

Open Source Agenda Badge

Open Source Agenda Rating