https://github.com/tgdev/webpack-scp-demo
The final version of the example highlighted in an article by Uday Hiwarale from ITNext on Medium
https://github.com/tgdev/webpack-scp-demo
Last synced: over 1 year ago
JSON representation
The final version of the example highlighted in an article by Uday Hiwarale from ITNext on Medium
- Host: GitHub
- URL: https://github.com/tgdev/webpack-scp-demo
- Owner: tgdev
- Created: 2019-01-28T07:40:41.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-01-28T07:57:15.000Z (over 7 years ago)
- Last Synced: 2025-01-29T21:44:02.334Z (over 1 year ago)
- Language: JavaScript
- Size: 163 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Webpack 4 Code Splitting using SplitChunksPlugin
The final version of the example highlighted in [this fantastic article on Medium](https://itnext.io/react-router-and-webpack-v4-code-splitting-using-splitchunksplugin-f0a48f110312) by Uday Hiwarale from ITNext.
## Instructions
1. `yarn` to install dependencies
2. Execute command `yarn start` for running development server and preview
3. See network tab of console for what chunks are loaded (sync and async)
## Chunks
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)
## Credits
- [Uday Hiwarale](https://itnext.io/@thatisuday)