Utilizing the manifest

Webpack can know which files are being generated thanks to the manifest. This allows the software to track all output bundles and to map the modules. To manage outputs in other ways, it would be a good idea to utilize the manifest. 

Webpack essentially categorizes code by three types: source code written by the developer; vendor code written by a third party; and Webpack's runtime manifest, which conducts the interactions of all the modules.

The runtime and manifest data are what Webpack needs to connect your modular application while it runs in the browser.

If you decide to improve performance by using browser caching, this process will become an important thing to get to grips with.

By using content hashes within your bundle filenames, you can indicate to the browser when a file's contents have changed, and are thereby invalidating the cache. This is caused by the injection of the runtime and manifest, which changes with every build.

Webpack has WebpackManifestPlugin that can extract manifest data into a JSON file. 

Now that you've learned about dynamically adding bundles to your HTML, let's dive into the development guide. Or, if you want to dig into more advanced topics, we would recommend rereading the Code splitting section of this guide in the previous chapter, Chapter 2Working with Modules and Code Splitting.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
52.14.85.76