Imports with #[wasm_bindgen(js_name = default)]
from a local module with a default export break when compiling to a library
#3012
Labels
Describe the Bug
I'm trying to bind with a local module like so:
where
module.js
looks like this:Unfortunately, the resulting generated js bindings file for the rust library has an import that looks like this:
Because
module.js
has a default export,{ _default }
doesn't match with anything and is broken.Expected Behavior
What should be happening is this:
I've written a small patch that fixes this issue:
However this is probably the wrong way to handle this edgecase.
The text was updated successfully, but these errors were encountered: