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/other-options.mdx
+62Lines changed: 62 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -167,6 +167,8 @@ T> You can override properties in the loader context as webpack copies all prope
167
167
168
168
Name of the configuration. Used when loading multiple configurations.
169
169
170
+
This is especially useful when exporting an array of configurations. webpack uses `name` to identify each config in logs and stats output.
171
+
170
172
**webpack.config.js**
171
173
172
174
```javascript
@@ -176,18 +178,60 @@ export default {
176
178
};
177
179
```
178
180
181
+
For multi-configuration builds:
182
+
183
+
```javascript
184
+
exportdefault [
185
+
{
186
+
name:"client",
187
+
target:"web",
188
+
// ...
189
+
},
190
+
{
191
+
name:"server",
192
+
target:"node",
193
+
// ...
194
+
},
195
+
];
196
+
```
197
+
179
198
## parallelism
180
199
181
200
`number = 100`
182
201
183
202
Limit the number of parallel processed modules. Can be used to fine tune performance or to get more reliable profiling results.
184
203
204
+
Lower values reduce concurrent work and memory pressure, but may increase total build time. Higher values can improve throughput on powerful machines.
205
+
206
+
**webpack.config.js**
207
+
208
+
```javascript
209
+
exportdefault {
210
+
// ...
211
+
parallelism:50,
212
+
};
213
+
```
214
+
215
+
Use cases:
216
+
217
+
- Reduce `parallelism` when builds hit memory limits (for example in constrained CI runners).
218
+
- Increase it when you have enough CPU and memory and want to maximize build throughput.
219
+
185
220
## profile
186
221
187
222
`boolean`
188
223
189
224
Capture a "profile" of the application, including statistics and hints, which can then be dissected using the [Analyze](https://webpack.github.io/analyse/) tool. It will also log out a summary of module timings.
190
225
226
+
**webpack.config.js**
227
+
228
+
```javascript
229
+
exportdefault {
230
+
// ...
231
+
profile:true,
232
+
};
233
+
```
234
+
191
235
T> Combine `profile: true` with `parallelism: 1` to get correct timings. Note that this will slow down the build as well.
192
236
193
237
## recordsInputPath
@@ -196,6 +240,24 @@ T> Combine `profile: true` with `parallelism: 1` to get correct timings. Note th
196
240
197
241
Specify the file from which to read the last set of records. This can be used to rename a records file. See the example below.
198
242
243
+
When this option is set, webpack reads previously generated records from this path and uses them as input for stable module/chunk id tracking.
0 commit comments