Simple example for creating code splitting using React Router V4
Since the deprecation of System.import
by Webpack v3.x, the switch has been made to use Dynamic Import.
Using this Gist by Andrew Clark as inspiration I came up with this simple React app that uses React Router V4.x and Webpack 3.x to create the bundle files.
Clone this repo:
$ git clone https://github.com/rhernandog/react-webpack-code-splitting.git
Or download the ZIP file. Then install all the dependencies:
$ npm install
Finally run the server command to bundle the files and start the webpack dev server:
$ npm run server
- Initial stable commit.
Rodrigo Hernando
- MIT
Just create a PR.