-
Notifications
You must be signed in to change notification settings - Fork 13
Why Webpack
So why Webpack instead of Rust-only build pipeline?
-
Some tools are still (?) missing in Rust ecosystem — e.g. hot-reload, auto-reload with browser tab refresh, CSS/HTML minification, autoprefixer, prerendering, alternative to TailwindCSS…, etc. And yeah, I don’t have so much free time to fix or write them all.
-
There is
js!
macro incargo-web
, but there isn’t (?) alternative forwasm-pack
for writing custom JS scripts. And you want to write JS scripts because libraries likeweb_sys
still don’t (?) support all JS / DOM APIs. And if I have to write JS, I’d rather use Typescript — that's whyseed-quickstart-webpack
has preconfigured Typescript support (some examples are in brancholder
). -
“Why not Python / Ruby / bash scripts?” — I’m working mainly on Windows and was working on Mac. Many Seed users use Windows, too. If I can’t write it in cross-platform Rust, I’d rather write it with Node.js, because there is a better chance that it would work.
-
"Why not other bundlers? E.g. Parcel." - I’ve tried JS alternatives, including Parcel, but they were just too slow (yeah, it was several months ago, maybe it’s better now) and there were missing tools or documentation compared to Webpack. Everybody knows Webpack (even if everybody hates to setup it).
-
Once I decide I can/want to rewrite
seed-quickstart-webpack
to Rust-only solution, I will know exactly what I want so Rust code will be probably clean enough.