The final version of the example highlighted in this fantastic article on Medium by Uday Hiwarale from ITNext.
yarn
to install dependencies- Execute command
yarn start
for running development server and preview - See network tab of console for what chunks are loaded (sync and async)
Defined in webpack.config.js
.
- vendor: Anything in
node_modules
(sync) - common: Any import shared between 2 or more components (sync)
- main: Everything else required at runtime (sync)
- dynamic imports: 1 per page route (async)