1e7dcdedec
It's christmas, everyone is on holiday, it's time to change every single file in the repository!
35 lines
728 B
Markdown
35 lines
728 B
Markdown
# Webpack + Automerge
|
|
|
|
Getting WASM working in webpack 5 is very easy. You just need to enable the
|
|
`asyncWebAssembly`
|
|
[experiment](https://webpack.js.org/configuration/experiments/). For example:
|
|
|
|
```javascript
|
|
const path = require("path")
|
|
|
|
const clientConfig = {
|
|
experiments: { asyncWebAssembly: true },
|
|
target: "web",
|
|
entry: "./src/index.js",
|
|
output: {
|
|
filename: "main.js",
|
|
path: path.resolve(__dirname, "public"),
|
|
},
|
|
mode: "development", // or production
|
|
performance: {
|
|
// we dont want the wasm blob to generate warnings
|
|
hints: false,
|
|
maxEntrypointSize: 512000,
|
|
maxAssetSize: 512000,
|
|
},
|
|
}
|
|
|
|
module.exports = clientConfig
|
|
```
|
|
|
|
## Running the example
|
|
|
|
```bash
|
|
yarn install
|
|
yarn start
|
|
```
|