Skip to content

Commit 6e18b81

Browse files
authored
docs: add optimization.checkWasmTypes (#7200)
1 parent b11f6f8 commit 6e18b81

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

src/content/configuration/optimization.mdx

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,24 @@ related:
1919
url: https://medium.com/webpack/webpack-4-code-splitting-chunk-graph-and-the-splitchunks-optimization-be739a861366
2020
---
2121

22-
Since version 4 webpack runs optimizations for you depending on the chosen [`mode`](/configuration/mode/), still all optimizations are available for manual configuration and overrides.
22+
Webpack runs optimizations for you depending on the chosen [`mode`](/configuration/mode/), still all optimizations are available for manual configuration and overrides.
23+
24+
## optimization.checkWasmTypes
25+
26+
`boolean`
27+
28+
Tells webpack to check the incompatible types of WebAssembly modules when they are imported/exported. By default `optimization.checkWasmTypes` is enabled in `production` [mode](/configuration/mode/) and disabled elsewise.
29+
30+
**webpack.config.js**
31+
32+
```js
33+
module.exports = {
34+
//...
35+
optimization: {
36+
checkWasmTypes: false,
37+
},
38+
};
39+
```
2340

2441
## optimization.chunkIds
2542

0 commit comments

Comments
 (0)