mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-04-28 11:09:51 -04:00
This patch does a couple of things:
1. Fix the compilation of the example, Message -> MessageLike
2. Update Webpack and friends for the example
3. Remove futures-timer's Delay method and use equivalent methods from
Tokio and wasm-timers.
The last point was needed because futures-timer would end up triggering
this error:
ReferenceError: can't access lexical declaration '__wbg_clearTimeout_d8b36ad8fa330187' before initialization
26 lines
615 B
JavaScript
26 lines
615 B
JavaScript
const path = require('path');
|
|
const HTMLWebpackPlugin = require('html-webpack-plugin');
|
|
const WasmPackPlugin = require("@wasm-tool/wasm-pack-plugin");
|
|
|
|
module.exports = {
|
|
mode: 'development',
|
|
devtool: 'eval-source-map',
|
|
entry: './index.js',
|
|
output: {
|
|
filename: 'index.js',
|
|
path: path.resolve(__dirname, 'dist'),
|
|
},
|
|
experiments: {
|
|
asyncWebAssembly: true
|
|
},
|
|
resolve: {
|
|
extensions: ['.js'],
|
|
},
|
|
plugins: [
|
|
new HTMLWebpackPlugin(),
|
|
new WasmPackPlugin({
|
|
crateDirectory: path.resolve(__dirname, ".")
|
|
}),
|
|
],
|
|
};
|