2017-10-30 20:56:57 +08:00
|
|
|
module.exports = {
|
2017-12-14 17:09:09 +08:00
|
|
|
// mode: "development || "production",
|
2017-10-30 20:56:57 +08:00
|
|
|
output: {
|
2019-01-28 09:27:57 +08:00
|
|
|
webassemblyModuleFilename: "[hash].wasm",
|
2019-05-24 20:24:44 +08:00
|
|
|
publicPath: "dist/"
|
2017-10-30 20:56:57 +08:00
|
|
|
},
|
|
|
|
module: {
|
2018-02-25 09:00:20 +08:00
|
|
|
rules: [
|
|
|
|
{
|
|
|
|
test: /\.wasm$/,
|
2019-05-24 18:30:43 +08:00
|
|
|
type: "webassembly/async-experimental"
|
2018-02-25 09:00:20 +08:00
|
|
|
}
|
|
|
|
]
|
2017-12-14 17:09:09 +08:00
|
|
|
},
|
|
|
|
optimization: {
|
2018-12-19 21:05:17 +08:00
|
|
|
chunkIds: "deterministic" // To keep filename consistent between different modes (for example building only)
|
2019-06-05 19:25:15 +08:00
|
|
|
},
|
|
|
|
experiments: {
|
2019-06-05 20:26:08 +08:00
|
|
|
asyncWebAssembly: true,
|
|
|
|
importAwait: true
|
2017-10-30 20:56:57 +08:00
|
|
|
}
|
|
|
|
};
|