Skip to content

Commit 2608347

Browse files
Add description to the CommonsChunkPlugin docs.
1 parent 9a6b7d4 commit 2608347

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

content/plugins/commons-chunk-plugin.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,13 @@ title: commons-chunk-plugin
33
contributors:
44
- bebraw
55
- simon04
6+
- christopher4lis
67
---
78

89
```javascript
910
new webpack.optimize.CommonsChunkPlugin(options)
1011
```
12+
The `CommonsChunkPlugin` is an opt-in feature that creates a separate file (known as a chunk), consisting of common modules shared between multiple entry points. By separating common modules from bundles, the resulting chunked file can be loaded once initially, and stored in cache for later use. This results in pagespeed optimizations as the browser can quickly serve the shared code from cache, rather than being forced to load a larger bundle whenever a new page is visited.
1113

1214
## Options
1315

0 commit comments

Comments
 (0)