wasm-bindgen icon indicating copy to clipboard operation
wasm-bindgen copied to clipboard

Remove Webpack from examples?

Open ivnsch opened this issue 3 years ago • 6 comments

Is there a way to remove this third party from the examples, to provide a simpler entry to newcomers? I imagine that people interested in WASM don't necessarily have worked with Webpack.

The maintainer(s) are also not familiar with it (see this issue), so if if something comes up, nobody can fix it.

Since I don't have experience with bundlers I can't give advice, but it seems possible? See e.g. https://markus.oberlehner.net/blog/goodbye-webpack-building-vue-applications-without-webpack/

ivnsch avatar Dec 27 '20 01:12 ivnsch

I would prefer to keep the webpack example around, but if it's simpler to hide it a bit more that would ok. I'm the one that introduced the it and didn't look after it for a while.

xtuc avatar Dec 31 '20 10:12 xtuc

You would like to keep it around because...? And are you able to help with the linked issue?

ivnsch avatar Jan 02 '21 22:01 ivnsch

I don't think it makes sense to remove webpack entirely, that's a feature of wasm-bindgen that it's compatible with webpack. I do think, though, that it may make more sense to transition examples to --target web by default and have a specific example for just webpack.

alexcrichton avatar Jan 04 '21 16:01 alexcrichton

that's a feature of wasm-bindgen that it's compatible with webpack

What does compatibility mean here? Is there any client side Javascript project that can't be used with webpack?

have a specific example for just webpack

Agree! dedicated webpack examples would be better. The main examples should contain only the minimum to get it working. In the linked issue we don't even know whether the problem is caused by webpack or wasm-bindgen. If it's possible to separate the examples, this kind of situation can't happen.

ivnsch avatar Jan 04 '21 17:01 ivnsch

By compatibility I mean there's an example of showing how to use wasm-bindgen and webpack together to stitch everything together.

alexcrichton avatar Jan 04 '21 19:01 alexcrichton

Is wasm-bindgen intended to be used independently from wasm-pack/WasmPackPlugin ? wasm-pack has some annoying limitations so I am about to resort to use wasm-bindgen directly, but the examples in the docs give an impression that it is not how it is supposed to be used...

UPD: nevermind, I saw a remark in the docs! leaving the comment just for the history.

0xorial avatar Sep 01 '22 10:09 0xorial