A simple example of Isomorphic bundling using webpack
- Webpack 4
- HMR & hot reload on both server and client
- React 16
- Babel 7
There are two examples,
- using webpack only
- using webpack-server-middleware
Switch example directory & install dependencies.
cd pure-webpack
yarn
Create server bundle and start watching for changes
yarn run watch
Start server
yarn start:dev
View Example app on localhost:3000
Switch example directory & install dependencies.
cd hot-server-middleware
yarn
Start server
yarn start:dev
View Example app on localhost:3000