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

matrix_sdk_crypto_wasm_bg.wasm is part of bundle when build for browser. #3941

Closed
fasergeyte opened this issue Dec 6, 2023 · 5 comments
Closed

Comments

@fasergeyte
Copy link

We have browser app and use webpack as builder. We discovered that bundle includes huge file - matrix_sdk_crypto_wasm_bg.wasm, is it required for browser bundle?

image

@fasergeyte
Copy link
Author

I also created a repo with example https://github.com/fasergeyte/matrix-sdk-issue-str

@t3chguy
Copy link
Member

t3chguy commented Dec 6, 2023

This isn't the place for questions. Use #matrix-dev:matrix.org for queries next time. You can strip it in your bundler if you're not using Rust Crypto but in the future it'll be the only supported crypto.

@t3chguy t3chguy closed this as not planned Won't fix, can't repro, duplicate, stale Dec 6, 2023
@fasergeyte
Copy link
Author

@t3chguy Thanks for the quick answer!
Does Web Element use it? I don't see it would load this large file in dev tools in browser.

@t3chguy
Copy link
Member

t3chguy commented Dec 6, 2023

Element Web uses it if you have that feature enabled, e.g. develop.element.io does

@richvdh
Copy link
Member

richvdh commented Dec 15, 2023

To be clear: Element-Web puts the matrix_sdk_crypto_wasm_bg.wasm.js into a separate chunk which is only downloaded once Rust crypto is enabled (currently https://develop.element.io/bundles/e7951d5c676552b67da7/6984.js). As far as I know this is just default behaviour for Webpack, so I'm not really sure why it's not working for you.

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

No branches or pull requests

3 participants