Skip to content

Commit 7af2725

Browse files
authored
docs(configuration): add output.workerWasmLoading (#7156)
1 parent c8d1cbd commit 7af2725

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

src/content/configuration/output.mdx

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2376,7 +2376,7 @@ module.exports = {
23762376

23772377
## output.wasmLoading
23782378

2379-
`boolean = false` `string`
2379+
`false` `'fetch-streaming' | 'fetch' | 'async-node'` `string`
23802380

23812381
Option to set the method of loading WebAssembly Modules. Methods included by default are `'fetch'` (web/WebWorker), `'async-node'` (Node.js), but others might be added by plugins.
23822382

@@ -2444,3 +2444,20 @@ module.exports = {
24442444
},
24452445
};
24462446
```
2447+
2448+
## output.workerWasmLoading
2449+
2450+
`false` `'fetch-streaming' | 'fetch' | 'async-node'` `string`
2451+
2452+
Option to set the method of loading WebAssembly Modules in workers, defaults to the value of [output.wasmLoading](#outputwasmloading).
2453+
2454+
**webpack.config.js**
2455+
2456+
```javascript
2457+
module.exports = {
2458+
//...
2459+
output: {
2460+
workerWasmLoading: 'fetch',
2461+
},
2462+
};
2463+
```

0 commit comments

Comments
 (0)