mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-21 16:51:33 +00:00
@ -3,6 +3,15 @@
|
||||
// will work here one day as well!
|
||||
const js = import("./hello_world");
|
||||
|
||||
js.then(js => {
|
||||
Promise.all([
|
||||
js,
|
||||
|
||||
// Due to https://github.com/webpack/webpack/issues/6475, Webpack does not
|
||||
// support sync wasm imports larger than 4kB in Chrome. We use wasm2es6js to
|
||||
// hack around this and need to defer our call until the converted wasm
|
||||
// module is asynchronously loaded. Uncomment this line to enable.
|
||||
// This hack is not necessary in Firefox.
|
||||
// import("./hello_world_wasm.js").then(wasm => wasm.booted),
|
||||
]).then(([js]) => {
|
||||
js.greet("World!");
|
||||
});
|
||||
|
Reference in New Issue
Block a user