mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-03-16 02:00:51 +00:00
Because of some incorrect use of `js.push_str(..)`, we could sometimes emit code before the ES modules imports, which is syntactically invalid: const __exports = {}; import { Thing } from '...'; // Syntax error! This has been fixed by making sure that the correct `imports` or `imports_post` string is built up. We now also assert that the `js` string is empty at the location where we add imports if we're using ES modules.