From 554ae3549e251a4ccef1432b09db3973ff8b08c1 Mon Sep 17 00:00:00 2001 From: EugeneHlushko Date: Mon, 10 Sep 2018 23:05:11 +0300 Subject: [PATCH 1/2] docs(manifest) corrections and small update to concept manifest page --- src/content/concepts/manifest.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/content/concepts/manifest.md b/src/content/concepts/manifest.md index b675033b769f..caa33b528c4a 100644 --- a/src/content/concepts/manifest.md +++ b/src/content/concepts/manifest.md @@ -9,26 +9,26 @@ related: - title: Predictable Long Term Caching with Webpack url: https://medium.com/webpack/predictable-long-term-caching-with-webpack-d3eee1d3fa31 - title: Caching - url: /guides/caching + url: /guides/caching/ --- In a typical application or site built with webpack, there are three main types of code: 1. The source code you, and maybe your team, have written. 2. Any third-party library or "vendor" code your source is dependent on. -3. A webpack runtime and _manifest_ that conducts the interaction of all modules. +3. A webpack runtime and __manifest__ that conducts the interaction of all modules. This article will focus on the last of these three parts, the runtime and in particular the manifest. ## Runtime -As mentioned above, we'll only briefly touch on this. The runtime, along with the manifest data, is basically all the code webpack needs to connect your modularized application while it's running in the browser. It contains the loading and resolving logic needed to connect your modules as they interact. This includes connecting modules that have already been loaded into the browser as well as logic to lazy-load the ones that haven't. +The runtime, along with the manifest data, is basically all the code webpack needs to connect your modularized application while it's running in the browser. It contains the loading and resolving logic needed to connect your modules as they interact. This includes connecting modules that have already been loaded into the browser as well as logic to lazy-load the ones that haven't. ## Manifest -So, once your application hits the browser in the form of an `index.html` file, some bundles, and a variety of other assets, what does it look like? That `/src` directory you meticulously laid out is now gone, so how does webpack manage the interaction between all of your modules? This is where the manifest data comes in... +Once your application hits the browser in the form of `index.html` file, some bundles and a variety of other assets required by your application must be loaded and linked somehow. That `/src` directory you meticulously laid out is now bundled, minified and maybe even splitted into smaller chunks for lazy-loading by webpack's [`optimization`](/configuration/optimization/). So how does webpack manage the interaction between all of your required modules? This is where the manifest data comes in... As the compiler enters, resolves, and maps out your application, it keeps detailed notes on all your modules. This collection of data is called the "Manifest" and it's what the runtime will use to resolve and load modules once they've been bundled and shipped to the browser. No matter which [module syntax](/api/module-methods) you have chosen, those `import` or `require` statements have now become `__webpack_require__` methods that point to module identifiers. Using the data in the manifest, the runtime will be able to find out where to retrieve the modules behind the identifiers. @@ -39,4 +39,4 @@ So now you have a little bit of insight about how webpack works behind the scene By using content hashes within your bundle file names, you can indicate to the browser when the contents of a file has changed thus invalidating the cache. Once you start doing this though, you'll immediately notice some funny behavior. Certain hashes change even when their contents apparently do not. This is caused by the injection of the runtime and manifest which changes every build. -See [the manifest section](/guides/output-management#the-manifest) of our _Managing Built Files_ guide to learn how to extract the manifest, and read the guides below to learn more about the intricacies of long term caching. +See [the manifest section](/guides/output-management/#the-manifest) of our _Output management_ guide to learn how to extract the manifest, and read the guides below to learn more about the intricacies of long term caching. From f9d0f4f70de686d14e24d3bdbbd3c83dd1348817 Mon Sep 17 00:00:00 2001 From: EugeneHlushko Date: Mon, 10 Sep 2018 23:07:44 +0300 Subject: [PATCH 2/2] docs(manifest) forgot to add EugeneHlushko to contributors --- src/content/concepts/manifest.md | 1 + 1 file changed, 1 insertion(+) diff --git a/src/content/concepts/manifest.md b/src/content/concepts/manifest.md index caa33b528c4a..9398f81f39b4 100644 --- a/src/content/concepts/manifest.md +++ b/src/content/concepts/manifest.md @@ -3,6 +3,7 @@ title: The Manifest sort: 10 contributors: - skipjack + - EugeneHlushko related: - title: Separating a Manifest url: https://survivejs.com/webpack/optimizing/separating-manifest/