Hacker News new | past | comments | ask | show | jobs | submit login

Okay, so rustc is compiling rust to machine code. Here we have some advanced version of JavaScript (es7?) going through a series of compilations, asset extraction, tree shaking, dependency graphs that are 10000+ packages long etc. The solutions rust and cargo choose (like having a decent standard library to reduce deps) are all better. Rust is fast and worth paying a compilation prise for, is it worth it in JS so we can have shiny semantic sugar everywhere? I don’t know how crate modules works but hopefully each library needs you to specify versions of all dependencies at the top level rather than magically hiding modules you’re adding 5 levels deep.

I could probably go on further if I knew rust better. The ecosystems are completely different IMO and webpack as a build system leads to complexity not clarity - its like a machine where an animal goes in and a sausage comes out, whereas other build systems are more logical in their steps.




Yes good luck shipping that main.rs to a web browser.

The problem that Webpack solves is performance optimization in addition to what Rust offers:

- writing in a higher-level language: "write modern code and ship to IE 5" is the same as "write in Rust and ship to x64"

- take a bunch of files and make 1 or 2 out of it.

Nobody stops you from loading jQuery and 3 plugins in a script tag and call it a day. Webpack exists because jQuery and 3 plugins can't deliver the same results nowadays.

Also, do you want to improve your code with types and linting? Do that without Webpack, it's not going to be much more efficient.

---

In short, Webpack and Babel basically match the Rust compiler in functionality. If you don't use them, your web app’s code will be harder to manage, not easier. That's all.


Have you ever seen a 3000 line webpack config file. I think the analogy between webpack and rust is nonsense to be honest. They are doing different things, I just bit on the previous question.

Maybe you can justify the complexity in JS projects but I find it excessive.


If you replace Webpack with Parcel, the argument holds up. Webpack just offers more bells and whistles, which in our case we need to wrestle legacy projects into modern build pipelines. For a new project, maybe you don’t need all that, and you also don’t need Webpack with 3000 config lines. And fwiw, with every major, Webpack has moved to more sensible defaults for modern web bundling, meaning if you stick with it for a new project, likely you only need 5 config lines




Consider applying for YC's Summer 2025 batch! Applications are open till May 13

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: