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
docs(concepts): Small improvements to readability in index.mdx (#5311)
* Small improvements to readability in index.mdx
Added a brief blurb to explain what bundles are. Rewording to indicate the relationship between the dependency graph and bundle generation.
The first warning under Loaders was confusing because it references an ability to import modules as if this was mentioned previously in the article. It wasn't. Rewording to make webpack the subject of the sentence.
Rewording to show that the html-webpack-plugin in the code example injects the bundles into the generated html file. Before, the article made it seem as if injecting bundles was somehow a necessary step to creating an html file.
* Update src/content/concepts/index.mdx
Co-authored-by: Ryan Greyling <[email protected]>
Co-authored-by: Sam Chen <[email protected]>
Copy file name to clipboardExpand all lines: src/content/concepts/index.mdx
+4-3Lines changed: 4 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -19,9 +19,10 @@ contributors:
19
19
- Jalitha
20
20
- muhmushtaha
21
21
- chenxsan
22
+
- RyanGreyling2
22
23
---
23
24
24
-
At its core, **webpack** is a _static module bundler_ for modern JavaScript applications. When webpack processes your application, it internally builds a [dependency graph](/concepts/dependency-graph/)which maps every module your project needs and generates one or more _bundles_.
25
+
At its core, **webpack** is a _static module bundler_ for modern JavaScript applications. When webpack processes your application, it internally builds a [dependency graph](/concepts/dependency-graph/)from one or more _entry points_ and then combines every module your project needs into one or more _bundles_, which are static assets to serve your content from.
25
26
26
27
T> Learn more about JavaScript modules and webpack modules [here](/concepts/modules).
27
28
@@ -88,7 +89,7 @@ T> The `output` property has [many more configurable features](/configuration/ou
88
89
89
90
Out of the box, webpack only understands JavaScript and JSON files. **Loaders** allow webpack to process other types of files and convert them into valid [modules](/concepts/modules) that can be consumed by your application and added to the dependency graph.
90
91
91
-
W> Note that the ability to `import` any type of module, e.g. `.css` files, is a feature specific to webpack and may not be supported by other bundlers or task runners. We feel this extension of the language is warranted as it allows developers to build a more accurate dependency graph.
92
+
W> One of webpack's specific features is the ability to `import` any type of module, e.g. `.css` files, which may not be supported by other bundlers or task runners. We feel this extension of the language is warranted as it allows developers to build a more accurate dependency graph.
92
93
93
94
At a high level, **loaders** have two properties in your webpack configuration:
94
95
@@ -142,7 +143,7 @@ module.exports = {
142
143
};
143
144
```
144
145
145
-
In the example above, the `html-webpack-plugin` generates an HTML file for your application by injecting automatically all your generated bundles.
146
+
In the example above, the `html-webpack-plugin` generates an HTML file for your application and automatically injects all your generated bundles into this file.
146
147
147
148
T> There are many plugins that webpack provides out of the box! Check out the [list of plugins](/plugins).
0 commit comments