You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hopefully clarify [Concepts/Output](concepts/output.md) and [Concepts/Targets](concepts/targets.md) little bit further as well as some general spelling/grammar (please don't hate me) updates
Copy file name to clipboardExpand all lines: content/concepts/hot-module-replacement.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,14 +19,14 @@ The app code asks the HMR runtime to check for updates. The HMR runtime download
19
19
20
20
In addition to the normal assets the compiler need to emit the "Update" to allow updating from previous version to this version. The "Update" contains two parts:
21
21
22
-
1.the update manifest (JSON)
23
-
2.one or multiple update chunks (JavaScript)
22
+
1.The update manifest (JSON)
23
+
2.One or multiple update chunks (JavaScript)
24
24
25
25
The manifest contains the new compilation hash and a list of all update chunks (2.).
26
26
27
27
The update chunks contain code for all updated modules in this chunk (or a flag if a module was removed).
28
28
29
-
The compiler addtionally makes sure that module and chunk ids are consistent between these builds. It uses a "records" json file to store them between builds (or it stores them in memory).
29
+
The compiler additionally makes sure that module and chunk ids are consistent between these builds. It uses a "records" json file to store them between builds (or it stores them in memory).
30
30
31
31
### From The Module View
32
32
@@ -40,7 +40,7 @@ For the module system runtime additional code is emitted to track module `parent
40
40
41
41
On the management side the runtime supports two methods: `check` and `apply`.
42
42
43
-
A `check` does a HTTP request to the update manifest. When this request fails, there is no update available. Elsewise the list of updated chunks is compared to the list of currently loaded chunks. For each loaded chunk the corresponding update chunk is downloaded. All module updates as stored in the runtime as update. The runtime switches into the `ready` state, meaning an update has been downloaded and is ready to be applied.
43
+
A `check` does a HTTP request to the update manifest. When this request fails, there is no update available. Otherwise, the list of updated chunks is compared to the list of currently loaded chunks. For each loaded chunk the corresponding update chunk is downloaded. All module updates as stored in the runtime as update. The runtime switches into the `ready` state, meaning an update has been downloaded and is ready to be applied.
44
44
45
45
For each new chunk request in the ready state the update chunk is also downloaded.
46
46
@@ -52,6 +52,6 @@ Now all invalid modules are disposed (dispose handler) and unloaded. Then the cu
52
52
53
53
You can use it in development as a LiveReload replacement. webpack-dev-server supports a hot mode which tries to update with HMR before trying to reload the whole page. See how to implement [HMR with React](/guides/hmr-react) for example.
54
54
55
-
Some loaders already generate modules that are hot-updateable. i.e. the `style-loader` can exchange the stylesheet. You don't need to do anything special.
55
+
Some loaders already generate modules that are hot-updatable. i.e. the `style-loader` can exchange the stylesheet. You don't need to do anything special.
56
56
57
-
webpack's power lies in its customizability, and there are *many* ways of configuring HMR given the needs of a particular project.
57
+
Webpack's power lies in its customizability, and there are *many* ways of configuring HMR given the needs of a particular project.
Copy file name to clipboardExpand all lines: content/concepts/modules.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,6 +39,6 @@ The webpack community has built _loaders_ for a wide variety of popular language
39
39
*[Less](http://lesscss.org)
40
40
*[Stylus](http://stylus-lang.com)
41
41
42
-
And many others! Overall, webpack provides a powerful and rich API for customization that allows one to use webpack for **any stack**, while staying **unopinionated** about your development, testing, and production workflows.
42
+
And many others! Overall, webpack provides a powerful and rich API for customization that allows one to use webpack for **any stack**, while staying **non-opinionated** about your development, testing, and production workflows.
43
43
44
44
For a full list, see [**the list of loaders**](https://webpack.github.io/docs/list-of-loaders.html) or [**write your own**](/api/loaders).
Copy file name to clipboardExpand all lines: content/concepts/targets.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,9 +21,11 @@ module.exports = {
21
21
};
22
22
```
23
23
24
+
In the example above, using `node` webpack will compile for usage in a Node.js-like environment (uses Node.js `require` to load chunks and not touch any built in modules like `fs` or `path`).
25
+
24
26
Each _target_ has a variety of deployment/environment specific additions, support to fit its needs. See what [targets are available](/configuration/target).
25
27
26
-
?> We should expand on this further. What specifically is included.
28
+
?>Further expansion for other popular target values
0 commit comments