You are viewing a single comment's thread from:

RE: Introducing webassembly-loader: Yet another webpack-loader for importing wasm code 😂

in #utopian-io6 years ago

Though I am not able to understand why have you created webassembly-loader when there are other webpack-loader

At first, I also have the same question about webpack 4 which begin to support webassembly file. why they add webassembly/experimental feature when there is wasm-loader?
I begin to understand the reason. Seems they do it for maintainability as well as experimenting some new technique on how to import a module.

Well, the reason I create another loader, as I said in the article:
This way rs-jest (a Jest transformer that I create to make Rust code can be used in Javascript project as a Webassembly module) can be used in a project that either uses Webpack or Rollup.
Summary, compatibility reason.

Another reason is I want to make maintaining "export mode" feature easier. Both in rs-jest and rollup-plugin-rust.