Closed Pauan closed 4 years ago
This was first reported here: https://github.com/rustwasm/wasm-bindgen/issues/2120
The problem is that wasm-bindgen changed its code generation, and since this plugin does custom parsing of the JS code, that is now broken.
In addition, wasm-bindgen now generates a foo_bg.js file (rather than foo.js), so the file path needs to be updated as well.
foo_bg.js
foo.js
However, most of this complexity can be avoided by using --target web. Then it wouldn't need to do custom parsing, and it wouldn't need a custom init section either.
--target web
Temporary workaround: in your Cargo.toml:
Cargo.toml
[dependencies] wasm-bindgen = "0.2, <0.2.61"
That keeps you away from the broken 0.2.61+ version.
0.2.61+
This was first reported here: https://github.com/rustwasm/wasm-bindgen/issues/2120
The problem is that wasm-bindgen changed its code generation, and since this plugin does custom parsing of the JS code, that is now broken.
In addition, wasm-bindgen now generates a
foo_bg.js
file (rather thanfoo.js
), so the file path needs to be updated as well.However, most of this complexity can be avoided by using
--target web
. Then it wouldn't need to do custom parsing, and it wouldn't need a custom init section either.