-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Explicitly add ".wasm" extension when importing wasm file in bundle target #1441
Comments
@alexcrichton are there any blockers for this update? There are situations when it's hard or impossible to modify |
@ibaryshnikov What version of Webpack are you using? It's not necessary to change the |
@Pauan angular 8, webpack 4.35.2 |
@ibaryshnikov Ah, right, Angular uses its own config, and hides This should of course be fixed on Angular's side, but I'm also in favor of fixing it on our side too. If I remember correctly, the reason we didn't do this earlier is because it was causing issues with tests, or something like that. So if all of that is resolved (and @alexcrichton gives the OK), then yeah let's fix this. |
💡 Feature description
When Parcel resolves generated pkg as a dependency, it cannot recognize "generated_pkg_bg" as a wasm file like what Webpack can do. Adding wasm extension explicitly can archive the compatibility.
There are plugins and built-in support in Parcel to resolve rs file or "Cargo.toml" directly, but this is fit for building components in a project, not for using package. Besides, Parcel encapsulate the pack so WebAssembly memory cannot be manipulated (I can still come back and import the generated bindgen file).
💻 Basic example
In generated "my_pkg.js" (bundle target)
⬇️
The text was updated successfully, but these errors were encountered: