Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 7046bee

Browse filesBrowse files
tanhauhauchenxsan
andauthored
docs(Configurations): explain default value of output.chunkFormat and output.chunkLoading is inferred from target (#6321)
* explain default value of output.chunkFormat and output.chunkLoading is inferred from target * Update output.mdx * Update src/content/configuration/output.mdx Co-authored-by: Sam Chen <chenxsan@gmail.com> * Update src/content/configuration/output.mdx Co-authored-by: Sam Chen <chenxsan@gmail.com> * Update output.mdx * Update src/content/configuration/output.mdx Co-authored-by: Sam Chen <chenxsan@gmail.com>
1 parent 94b1541 commit 7046bee
Copy full SHA for 7046bee

File tree

Expand file treeCollapse file tree

1 file changed

+8
-4
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+8
-4
lines changed

‎src/content/configuration/output.mdx

Copy file name to clipboardExpand all lines: src/content/configuration/output.mdx
+8-4Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,8 @@ module.exports = {
172172

173173
The format of chunks (formats included by default are `'array-push'` (web/WebWorker), `'commonjs'` (node.js), `'module'` (ESM), but others might be added by plugins).
174174

175+
T> The default value of this option depends on the [`target`](/configuration/target/) and [`output.module`](#outputmodule) setting. For more details, search for `"chunkFormat"` [in the webpack defaults](https://github.com/webpack/webpack/blob/main/lib/config/defaults.js).
176+
175177
**webpack.config.js**
176178

177179
```javascript
@@ -226,6 +228,8 @@ module.exports = {
226228

227229
The method to load chunks (methods included by default are `'jsonp'` (web), `'import'` (ESM), `'importScripts'` (WebWorker), `'require'` (sync node.js), `'async-node'` (async node.js), but others might be added by plugins).
228230

231+
T> The default value of this option depends on the [`target`](/configuration/target/) and [`chunkFormat `](#outputchunkformat) setting. For more details, search for `"chunkLoading"` [in the webpack defaults](https://github.com/webpack/webpack/blob/main/lib/config/defaults.js).
232+
229233
**webpack.config.js**
230234

231235
```javascript
@@ -353,7 +357,7 @@ module.exports = {
353357
};
354358
```
355359

356-
The following substitutions are available in template strings (via webpack's internal [`ModuleFilenameHelpers`](https://github.com/webpack/webpack/blob/master/lib/ModuleFilenameHelpers.js)):
360+
The following substitutions are available in template strings (via webpack's internal [`ModuleFilenameHelpers`](https://github.com/webpack/webpack/blob/main/lib/ModuleFilenameHelpers.js)):
357361

358362
| Template | Description |
359363
| ------------------------ | --------------------------------------------------------------------------------------------------- |
@@ -564,7 +568,7 @@ Note this option does not affect output files for on-demand-loaded chunks. It on
564568

565569
### Template strings
566570

567-
The following substitutions are available in template strings (via webpack's internal [`TemplatedPathPlugin`](https://github.com/webpack/webpack/blob/master/lib/TemplatedPathPlugin.js)):
571+
The following substitutions are available in template strings (via webpack's internal [`TemplatedPathPlugin`](https://github.com/webpack/webpack/blob/main/lib/TemplatedPathPlugin.js)):
568572

569573
Substitutions available on Compilation-level:
570574

@@ -864,7 +868,7 @@ In the above example, we're passing a single entry file to `entry`, however, web
864868
</script>
865869
```
866870

867-
See [this example](https://github.com/webpack/webpack/tree/master/examples/multi-part-library) for more.
871+
See [this example](https://github.com/webpack/webpack/tree/main/examples/multi-part-library) for more.
868872

869873
Note that the above configuration won't work as expected if you're going to configure library options per entry point. Here is how to do it [under each of your entries](/concepts/entry-points/#entrydescription-object):
870874

@@ -2289,7 +2293,7 @@ module.exports = {
22892293

22902294
The new option `workerChunkLoading` controls the chunk loading of workers.
22912295

2292-
T> The default value of this option is depending on the `target` setting. For more details, search for `"workerChunkLoading"`: [in the webpack defaults](https://github.com/webpack/webpack/blob/master/lib/config/defaults.js).
2296+
T> The default value of this option depends on the [`target`](/configuration/target/) setting. For more details, search for `"workerChunkLoading"` [in the webpack defaults](https://github.com/webpack/webpack/blob/main/lib/config/defaults.js).
22932297

22942298
**webpack.config.js**
22952299

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.