This chapter will explore modules and code splitting in Webpack 5. Modules are a way of structuring content so that code is sorted in sections by function. Code splitting is the method Webpack uses to build these modules automatically; it will parcel off code from your project into modules that best suit the functionality and structure of the completed project.
The topics covered in this chapter are as follows:
- Explaining modules
- Understanding code splitting
- Prefetching and preloading modules
- Best practices