You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/configuration/dev-server.md
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -215,7 +215,7 @@ webpack-dev-server --compress
215
215
216
216
`boolean``string``array`
217
217
218
-
Tell the server where to serve content from. This is only necessary if you want to serve static files. [`devServer.publicPath`](#devserver-publicpath-) will be used to determine where the bundles should be served from, and takes precedence.
218
+
Tell the server where to serve content from. This is only necessary if you want to serve static files. [`devServer.publicPath`](#devserverpublicpath-) will be used to determine where the bundles should be served from, and takes precedence.
219
219
220
220
By default it will use your current working directory to serve content, but you can modify this to another directory:
221
221
@@ -421,7 +421,7 @@ T> Note that `webpack.HotModuleReplacementPlugin` is required to fully enable HM
421
421
422
422
`boolean`
423
423
424
-
Enables Hot Module Replacement (see [`devServer.hot`](#devserver-hot)) without page refresh as fallback in case of build failures.
424
+
Enables Hot Module Replacement (see [`devServer.hot`](#devserverhot)) without page refresh as fallback in case of build failures.
Copy file name to clipboardExpand all lines: src/content/configuration/module.md
+13-13Lines changed: 13 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -58,7 +58,7 @@ There are two input values for the conditions:
58
58
59
59
**Example:** When we `import './style.css'` within `app.js`, the resource is `/path/to/style.css` and the issuer is `/path/to/app.js`.
60
60
61
-
In a Rule the properties [`test`](#rule-test), [`include`](#rule-include), [`exclude`](#rule-exclude) and [`resource`](#rule-resource) are matched with the resource and the property [`issuer`](#rule-issuer) is matched with the issuer.
61
+
In a Rule the properties [`test`](#ruletest), [`include`](#ruleinclude), [`exclude`](#ruleexclude) and [`resource`](#ruleresource) are matched with the resource and the property [`issuer`](#ruleissuer) is matched with the issuer.
62
62
63
63
When using multiple conditions, all conditions must match.
64
64
@@ -74,18 +74,18 @@ There are two output values of a Rule:
74
74
1. Applied loaders: An array of loaders applied to the resource.
75
75
2. Parser options: An options object which should be used to create the parser for this module.
76
76
77
-
These properties affect the loaders: [`loader`](#rule-loader), [`options`](#rule-options-rule-query), [`use`](#rule-use).
77
+
These properties affect the loaders: [`loader`](#ruleloader), [`options`](#ruleoptions--rulequery), [`use`](#ruleuse).
78
78
79
-
For compatibility also these properties: [`query`](#rule-options-rule-query), [`loaders`](#rule-loaders).
79
+
For compatibility also these properties: [`query`](#ruleoptions--rulequery), [`loaders`](#ruleloaders).
80
80
81
-
The [`enforce`](#rule-enforce) property affects the loader category. Whether it's a normal, pre- or post- loader.
81
+
The [`enforce`](#ruleenforce) property affects the loader category. Whether it's a normal, pre- or post- loader.
82
82
83
-
The [`parser`](#rule-parser) property affects the parser options.
83
+
The [`parser`](#ruleparser) property affects the parser options.
84
84
85
85
86
86
## Nested rules
87
87
88
-
Nested rules can be specified under the properties [`rules`](#rule-rules) and [`oneOf`](#rule-oneof).
88
+
Nested rules can be specified under the properties [`rules`](#rulerules) and [`oneOf`](#ruleoneof).
89
89
90
90
These rules are evaluated when the Rule condition matches.
91
91
@@ -114,12 +114,12 @@ Inline loaders and `!` prefixes should not be used as they are non-standard. The
114
114
115
115
## `Rule.exclude`
116
116
117
-
`Rule.exclude` is a shortcut to `Rule.resource.exclude`. If you supply a `Rule.exclude` option, you cannot also supply a `Rule.resource`. See [`Rule.resource`](#rule-resource) and [`Condition.exclude`](#condition) for details.
117
+
`Rule.exclude` is a shortcut to `Rule.resource.exclude`. If you supply a `Rule.exclude` option, you cannot also supply a `Rule.resource`. See [`Rule.resource`](#ruleresource) and [`Condition.exclude`](#condition) for details.
118
118
119
119
120
120
## `Rule.include`
121
121
122
-
`Rule.include` is a shortcut to `Rule.resource.include`. If you supply a `Rule.include` option, you cannot also supply a `Rule.resource`. See [`Rule.resource`](#rule-resource) and [`Condition.include`](#condition) for details.
122
+
`Rule.include` is a shortcut to `Rule.resource.include`. If you supply a `Rule.include` option, you cannot also supply a `Rule.resource`. See [`Rule.resource`](#ruleresource) and [`Condition.include`](#condition) for details.
123
123
124
124
125
125
## `Rule.issuer`
@@ -137,14 +137,14 @@ This option can be used to apply loaders to the dependencies of a specific modul
137
137
138
138
## `Rule.loader`
139
139
140
-
`Rule.loader` is a shortcut to `Rule.use: [ { loader } ]`. See [`Rule.use`](#rule-use) and [`UseEntry.loader`](#useentry) for details.
140
+
`Rule.loader` is a shortcut to `Rule.use: [ { loader } ]`. See [`Rule.use`](#ruleuse) and [`UseEntry.loader`](#useentry) for details.
141
141
142
142
143
143
## `Rule.loaders`
144
144
145
145
W> This option is __deprecated__ in favor of `Rule.use`.
146
146
147
-
`Rule.loaders` is an alias to `Rule.use`. See [`Rule.use`](#rule-use) for details.
147
+
`Rule.loaders` is an alias to `Rule.use`. See [`Rule.use`](#ruleuse) for details.
148
148
149
149
150
150
## `Rule.oneOf`
@@ -176,7 +176,7 @@ module.exports = {
176
176
177
177
## `Rule.options` / `Rule.query`
178
178
179
-
`Rule.options` and `Rule.query` are shortcuts to `Rule.use: [ { options } ]`. See [`Rule.use`](#rule-use) and [`UseEntry.options`](#useentry) for details.
179
+
`Rule.options` and `Rule.query` are shortcuts to `Rule.use: [ { options } ]`. See [`Rule.use`](#ruleuse) and [`UseEntry.options`](#useentry) for details.
180
180
181
181
W> `Rule.query` is deprecated in favor of `Rule.options` and `UseEntry.options`.
182
182
@@ -223,7 +223,7 @@ module.exports = {
223
223
224
224
## `Rule.resource`
225
225
226
-
A [`Condition`](#condition) matched with the resource. You can either supply a `Rule.resource` option or use the shortcut options `Rule.test`, `Rule.exclude`, and `Rule.include`. See details in [`Rule` conditions](#rule-conditions).
226
+
A [`Condition`](#condition) matched with the resource. You can either supply a `Rule.resource` option or use the shortcut options `Rule.test`, `Rule.exclude`, and `Rule.include`. See details in [`Rule` conditions](#ruleconditions).
227
227
228
228
229
229
## `Rule.resourceQuery`
@@ -260,7 +260,7 @@ Indicate what parts of the module contain side effects. See [Tree Shaking](/guid
260
260
261
261
## `Rule.test`
262
262
263
-
`Rule.test` is a shortcut to `Rule.resource.test`. If you supply a `Rule.test` option, you cannot also supply a `Rule.resource`. See [`Rule.resource`](#rule-resource) and [`Condition.test`](#condition) for details.
263
+
`Rule.test` is a shortcut to `Rule.resource.test`. If you supply a `Rule.test` option, you cannot also supply a `Rule.resource`. See [`Rule.resource`](#ruleresource) and [`Condition.test`](#condition) for details.
Copy file name to clipboardExpand all lines: src/content/configuration/output.md
+17-17Lines changed: 17 additions & 17 deletions
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ The top-level `output` key contains set of options instructing webpack on how an
20
20
21
21
`string``object`
22
22
23
-
When used in tandem with [`output.library`](#output-library) and [`output.libraryTarget`](#output-librarytarget), this option allows users to insert comments within the export wrapper. To insert the same comment for each `libraryTarget` type, set `auxiliaryComment` to a string:
23
+
When used in tandem with [`output.library`](#outputlibrary) and [`output.libraryTarget`](#outputlibrarytarget), this option allows users to insert comments within the export wrapper. To insert the same comment for each `libraryTarget` type, set `auxiliaryComment` to a string:
24
24
25
25
```js
26
26
module.exports= {
@@ -77,11 +77,11 @@ module.exports = {
77
77
78
78
`string`
79
79
80
-
This option determines the name of non-entry chunk files. See [`output.filename`](#output-filename) option for details on the possible values.
80
+
This option determines the name of non-entry chunk files. See [`output.filename`](#outputfilename) option for details on the possible values.
81
81
82
82
Note that these filenames need to be generated at runtime to send the requests for chunks. Because of this, placeholders like `[name]` and `[chunkhash]` need to add a mapping from chunk id to placeholder value to the output bundle with the webpack runtime. This increases the size and may invalidate the bundle when placeholder value for any chunk changes.
83
83
84
-
By default `[id].js` is used or a value inferred from [`output.filename`](#output-filename) (`[name]` is replaced with `[id]` or `[id].` is prepended).
84
+
By default `[id].js` is used or a value inferred from [`output.filename`](#outputfilename) (`[name]` is replaced with `[id]` or `[id].` is prepended).
85
85
86
86
87
87
## `output.chunkLoadTimeout`
@@ -122,7 +122,7 @@ Allows customization of the `script` type webpack injects `script` tags into the
122
122
123
123
A fallback used when the template string or function above yields duplicates.
124
124
125
-
See [`output.devtoolModuleFilenameTemplate`](#output-devtoolmodulefilenametemplate).
125
+
See [`output.devtoolModuleFilenameTemplate`](#outputdevtoolmodulefilenametemplate).
126
126
127
127
128
128
## `output.devtoolLineToLine`
@@ -188,14 +188,14 @@ module.exports = {
188
188
};
189
189
```
190
190
191
-
If multiple modules would result in the same name, [`output.devtoolFallbackModuleFilenameTemplate`](#output-devtoolfallbackmodulefilenametemplate) is used instead for these modules.
191
+
If multiple modules would result in the same name, [`output.devtoolFallbackModuleFilenameTemplate`](#outputdevtoolfallbackmodulefilenametemplate) is used instead for these modules.
192
192
193
193
194
194
## `output.devtoolNamespace`
195
195
196
196
`string`
197
197
198
-
This option determines the modules namespace used with the [`output.devtoolModuleFilenameTemplate`](#output-devtoolmodulefilenametemplate). When not specified, it will default to the value of: [`output.library`](#output-library). It's used to prevent source file path collisions in sourcemaps when loading multiple libraries built with webpack.
198
+
This option determines the modules namespace used with the [`output.devtoolModuleFilenameTemplate`](#outputdevtoolmodulefilenametemplate). When not specified, it will default to the value of: [`output.library`](#outputlibrary). It's used to prevent source file path collisions in sourcemaps when loading multiple libraries built with webpack.
199
199
200
200
For example, if you have 2 libraries, with namespaces `library1` and `library2`, which both have a file `./src/index.js` (with potentially different contents), they will expose these files as `webpack://library1/./src/index.js` and `webpack://library2/./src/index.js`.
201
201
@@ -204,7 +204,7 @@ For example, if you have 2 libraries, with namespaces `library1` and `library2`,
204
204
205
205
`string``function`
206
206
207
-
This option determines the name of each output bundle. The bundle is written to the directory specified by the [`output.path`](#output-path) option.
207
+
This option determines the name of each output bundle. The bundle is written to the directory specified by the [`output.path`](#outputpath) option.
208
208
209
209
For a single [`entry`](/configuration/entry-context#entry) point, this can be a static name.
210
210
@@ -267,7 +267,7 @@ Make sure to read the [Caching guide](/guides/caching) for details. There are mo
267
267
268
268
Note this option is called filename but you are still allowed to use something like `"js/[name]/bundle.js"` to create a folder structure.
269
269
270
-
Note this option does not affect output files for on-demand-loaded chunks. For these files the [`output.chunkFilename`](#output-chunkfilename) option is used. Files created by loaders also aren't affected. In this case you would have to try the specific loader's available options.
270
+
Note this option does not affect output files for on-demand-loaded chunks. For these files the [`output.chunkFilename`](#outputchunkfilename) option is used. Files created by loaders also aren't affected. In this case you would have to try the specific loader's available options.
271
271
272
272
The following substitutions are available in template strings (via webpack's internal [`TemplatedPathPlugin`](https://github.com/webpack/webpack/blob/master/lib/TemplatedPathPlugin.js)):
273
273
@@ -279,7 +279,7 @@ The following substitutions are available in template strings (via webpack's int
279
279
|[id]| The module identifier |
280
280
|[query]| The module query, i.e., the string following `?` in the filename |
281
281
282
-
The lengths of `[hash]` and `[chunkhash]` can be specified using `[hash:16]` (defaults to 20). Alternatively, specify [`output.hashDigestLength`](#output-hashdigestlength) to configure the length globally.
282
+
The lengths of `[hash]` and `[chunkhash]` can be specified using `[hash:16]` (defaults to 20). Alternatively, specify [`output.hashDigestLength`](#outputhashdigestlength) to configure the length globally.
283
283
284
284
If using a function for this option, the function will be passed an object containing the substitutions in the table above.
285
285
@@ -322,7 +322,7 @@ An optional salt to update the hash via Node.JS' [`hash.update`](https://nodejs.
322
322
323
323
`string``function`
324
324
325
-
Customize the filenames of hot update chunks. See [`output.filename`](#output-filename) option for details on the possible values.
325
+
Customize the filenames of hot update chunks. See [`output.filename`](#outputfilename) option for details on the possible values.
326
326
327
327
The only placeholders allowed here are `[id]` and `[hash]`, the default being:
328
328
@@ -346,14 +346,14 @@ Only used when [`target`](/configuration/target) is web, which uses JSONP for lo
346
346
347
347
A JSONP function used to asynchronously load hot-update chunks.
348
348
349
-
For details see [`output.jsonpFunction`](#output-jsonpfunction).
349
+
For details see [`output.jsonpFunction`](#outputjsonpfunction).
350
350
351
351
352
352
## `output.hotUpdateMainFilename`
353
353
354
354
`string``function`
355
355
356
-
Customize the main hot update filename. See [`output.filename`](#output-filename) option for details on the possible values.
356
+
Customize the main hot update filename. See [`output.filename`](#outputfilename) option for details on the possible values.
357
357
358
358
`[hash]` is the only available placeholder, the default being:
359
359
@@ -379,7 +379,7 @@ A JSONP function name used to asynchronously load chunks or join multiple initia
379
379
380
380
This needs to be changed if multiple webpack runtimes (from different compilation) are used on the same webpage.
381
381
382
-
If using the [`output.library`](#output-library) option, the library name is automatically appended.
382
+
If using the [`output.library`](#outputlibrary) option, the library name is automatically appended.
383
383
384
384
385
385
## `output.library`
@@ -388,7 +388,7 @@ If using the [`output.library`](#output-library) option, the library name is aut
388
388
389
389
`string` or `object` (since webpack 3.1.0; for `libraryTarget: "umd"`)
390
390
391
-
How the value of the `output.library` is used depends on the value of the [`output.libraryTarget`](#output-librarytarget) option; please refer to that section for the complete details. Note that the default option for `output.libraryTarget` is `var`, so if the following configuration option is used:
391
+
How the value of the `output.library` is used depends on the value of the [`output.libraryTarget`](#outputlibrarytarget) option; please refer to that section for the complete details. Note that the default option for `output.libraryTarget` is `var`, so if the following configuration option is used:
392
392
393
393
```js
394
394
module.exports= {
@@ -450,7 +450,7 @@ MySubModule.doSomething();
450
450
451
451
> Default: `"var"`
452
452
453
-
Configure how the library will be exposed. Any one of the following options can be used. Please note that this option works in conjunction with the value assigned to [`output.library`](#output-library). For the following examples, it is assumed that this value is configured as `MyLibrary`.
453
+
Configure how the library will be exposed. Any one of the following options can be used. Please note that this option works in conjunction with the value assigned to [`output.library`](#outputlibrary). For the following examples, it is assumed that this value is configured as `MyLibrary`.
454
454
455
455
T> Note that `_entry_return_` in the example code below is the value returned by the entry point. In the bundle itself, it is the output of the function that is generated by webpack from the entry point.
456
456
@@ -729,7 +729,7 @@ The value of the option is prefixed to every URL created by the runtime or loade
729
729
730
730
The default value is an empty string `""`.
731
731
732
-
Simple rule: The URL of your [`output.path`](#output-path) from the view of the HTML page.
732
+
Simple rule: The URL of your [`output.path`](#outputpath) from the view of the HTML page.
733
733
734
734
```js
735
735
module.exports= {
@@ -807,7 +807,7 @@ This option is only used when [`devtool`](/configuration/devtool) uses a SourceM
807
807
808
808
Configure how source maps are named. By default `"[file].map"` is used.
809
809
810
-
The `[name]`, `[id]`, `[hash]` and `[chunkhash]` substitutions from [#output-filename](#output-filename) can be used. In addition to those, you can use substitutions listed below. The `[file]` placeholder is replaced with the filename of the original file. We recommend __only using the `[file]` placeholder__, as the other placeholders won't work when generating SourceMaps for non-chunk files.
810
+
The `[name]`, `[id]`, `[hash]` and `[chunkhash]` substitutions from [`output.filename`](#outputfilename) can be used. In addition to those, you can use substitutions listed below. The `[file]` placeholder is replaced with the filename of the original file. We recommend __only using the `[file]` placeholder__, as the other placeholders won't work when generating SourceMaps for non-chunk files.
Copy file name to clipboardExpand all lines: src/content/configuration/resolve.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@ These options change how modules are resolved. webpack provides reasonable defau
18
18
19
19
`object`
20
20
21
-
Configure how modules are resolved. For example, when calling `import "lodash"` in ES2015, the `resolve` options can change where webpack goes to look for `"lodash"` (see [`modules`](#resolve-modules)).
21
+
Configure how modules are resolved. For example, when calling `import "lodash"` in ES2015, the `resolve` options can change where webpack goes to look for `"lodash"` (see [`modules`](#resolvemodules)).
0 commit comments