Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple Crates/Wasm Modules #18

Closed
mysterycommand opened this issue May 7, 2019 · 1 comment
Closed

Multiple Crates/Wasm Modules #18

mysterycommand opened this issue May 7, 2019 · 1 comment
Labels

Comments

@mysterycommand
Copy link
Owner

Unlike #9, this has to do with loading more than one *_bg.wasm module in the main bundle entry … either do like:

Promise.all([
  require("./a.rs"),
  require("./b.rs"),
  require("./c.rs"),
  require("./d.rs"),
  require("./e.rs")
])
  .then(([a, b, c, d, e]) => {
    module.bundle.cache[`${aId}`] = null;
    module.bundle.register(`${aId}`, a);

    module.bundle.cache[`${bId}`] = null;
    module.bundle.register(`${bId}`, b);

    module.bundle.cache[`${cId}`] = null;
    module.bundle.register(`${cId}`, c);

    module.bundle.cache[`${dId}`] = null;
    module.bundle.register(`${dId}`, d);

    module.bundle.cache[`${eId}`] = null;
    module.bundle.register(`${eId}`, e);
  })
  .then(() => {
    require("./entry.js");
  });

… or do something to shove multiple custom bundle loaders in the final entry (e.g. https://github.com/parcel-bundler/parcel/blob/master/packages/core/parcel-bundler/src/packagers/JSPackager.js#L222)

mysterycommand pushed a commit that referenced this issue Jun 29, 2019
…e/3.1.0)- Jun 29, 2019, 6:54 PM [skip ci]

v3.1.0
8601b74
# [3.1.0](v3.0.4...v3.1.0) (2019-06-29)

### Bug Fixes

* fix [#18](#18) ... it works! ([6da6c82](6da6c82))

### Features

* **examples:** an example using multiple rust/wasm-pack assets in a single bundle (lots of duplicai ([c53a506](c53a506))
@mysterycommand
Copy link
Owner Author

🎉 This issue has been resolved in version 3.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant