Skip to content

Commit db4ac5b

Browse files
jacobangelmontogeek
authored andcommitted
chore(plugins) Minor SplitChunks Documentation Clean Up (#2252)
* Minor Documentation Clean Up Originally, i was just trying to change defer => differ, but I ended up doing a bit more editing. * Lower the case
1 parent a0c6b73 commit db4ac5b

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/content/plugins/split-chunks-plugin.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ contributors:
77
- chrisdothtml
88
- EugeneHlushko
99
- byzyk
10+
- jacobangel
1011
- madhavarshney
1112
- sakhisheikh
1213
related:
@@ -23,9 +24,9 @@ Since webpack v4, the `CommonsChunkPlugin` was removed in favor of `optimization
2324

2425
## Defaults
2526

26-
Out of the box `SplitChunksPlugin` should work great for most users.
27+
Out of the box `SplitChunksPlugin` should work well for most users.
2728

28-
By default it only affects on-demand chunks because changing initial chunks would affect the script tags the HTML file should include to run the project.
29+
By default it only affects on-demand chunks, because changing initial chunks would affect the script tags the HTML file should include to run the project.
2930

3031
webpack will automatically split chunks based on these conditions:
3132

@@ -38,9 +39,9 @@ When trying to fulfill the last two conditions, bigger chunks are preferred.
3839

3940
## Configuration
4041

41-
For developers that want to have more control over this functionality, webpack provides a set of options to better fit your needs. If you're changing the configuration, it's a good idea to measure the impact of your changes to ensure there's a real benefit.
42+
webpack provides a set of options for developers that want more control over this functionality.
4243

43-
W> Default configuration was chosen to fit web performance best practices but the optimum strategy for your project might defer depending on the nature of it.
44+
W> The default configuration was chosen to fit web performance best practices, but the optimal strategy for your project might differ. If you're changing the configuration, you should measure the impact of your changes to ensure there's a real benefit.
4445

4546
## `optimization.splitChunks`
4647

@@ -86,7 +87,7 @@ By default webpack will generate names using origin and name of the chunk (e.g.
8687

8788
`function` `string`
8889

89-
This indicates which chunks will be selected for optimization. If a string is provided, possible values are `all`, `async`, and `initial`. Providing `all` can be particularly powerful because it means that chunks can be shared even between async and non-async chunks.
90+
This indicates which chunks will be selected for optimization. When a string is provided, valid values are `all`, `async`, and `initial`. Providing `all` can be particularly powerful, because it means that chunks can be shared even between async and non-async chunks.
9091

9192
```js
9293
module.exports = {
@@ -100,7 +101,7 @@ module.exports = {
100101
};
101102
```
102103

103-
Alternatively, you can provide a function for more control. The return value will indicate whether to include each chunk.
104+
Alternatively, you may provide a function for more control. The return value will indicate whether to include each chunk.
104105

105106
```js
106107
module.exports = {

0 commit comments

Comments
 (0)