Skip to content

name and chunks clarification #1428

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions content/plugins/commons-chunk-plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ new webpack.optimize.CommonsChunkPlugin(options)
names: string[],
// The chunk name of the commons chunk. An existing chunk can be selected by passing a name of an existing chunk.
// If an array of strings is passed this is equal to invoking the plugin multiple times for each chunk name.
// If specified in async mode, name or names will denote the sources for the async chunk. For example, if async is set,
// and name is set to X, then only async imports inside of X will be considered for the created chunk.
// If omitted and `options.async` or `options.children` is set all chunks are used,
// otherwise `options.filename` is used as chunk name.

Expand All @@ -38,6 +40,9 @@ new webpack.optimize.CommonsChunkPlugin(options)
chunks: string[],
// Select the source chunks by chunk names. The chunk must be a child of the commons chunk.
// If omitted all entry chunks are selected.
// In async mode, chunks will denote which async imports are considered. For example, if name is set to X,
// and chunks is set to ['a', 'b', 'c'] then only chunks a, b, and c inside of X will be considered for the
// created chunk

children: boolean,
// If `true` all children of the commons chunk are selected
Expand Down