FWIW I've tried something similar but have given up after a few weeks.
If I recall correctly to get the wasm file I had to tweak the webpack config. Then there were issues with how Joplin loads plugins -- the main js file is loaded from one dir, while all other assets, including wasm, end up in another place. I had to patch Joplin to get around that.
EDIT
Had a look at my code, I've got this in my webpack config (though I'm not sure if that was my final version)
const pluginConfig = Object.assign({}, baseConfig, {
...
plugins: [
...
new WasmPackPlugin({
crateDirectory: path.resolve(__dirname, "wasm"),
withTypeScript: true,
outDir: "../pkg",
}),
...