Skip to content

Commit 84e3303

Browse files
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]>
1 parent a862904 commit 84e3303

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/content/concepts/index.mdx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,10 @@ contributors:
1919
- Jalitha
2020
- muhmushtaha
2121
- chenxsan
22+
- RyanGreyling2
2223
---
2324

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.
2526

2627
T> Learn more about JavaScript modules and webpack modules [here](/concepts/modules).
2728

@@ -88,7 +89,7 @@ T> The `output` property has [many more configurable features](/configuration/ou
8889

8990
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.
9091

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.
9293

9394
At a high level, **loaders** have two properties in your webpack configuration:
9495

@@ -142,7 +143,7 @@ module.exports = {
142143
};
143144
```
144145

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.
146147

147148
T> There are many plugins that webpack provides out of the box! Check out the [list of plugins](/plugins).
148149

0 commit comments

Comments
 (0)