Earlier quoted context omitted.
To me what’s interesting is that ESBuild (which is a Go based JavaScript bundler) has come out of nowhere in a relatively short period of time, and it’s basically already better than any of the existing JS JS bundlers. Not just faster: it also has a radically simpler UI.
That makes perfect sense though. Older projects have a ton of baggage that they carry through all of the revisions. New-comers to the space can learn from the mistakes of previous approaches and also utilize the latest and greatest paradigms to solve the problem without worrying about backwards compatibility.
Webpack 5
121–130 of 182 posts
Re: Webpack 5
#122Earlier quoted context omitted.
> modern javascript ecosystem. I recently was convinced to start using a packer (webpack, parcel) and was blown away by the hoops people have to jump through to make stuff work. I've been spending an hour or so a day coming up to speed for the past few weeks, and every yarn/npm package I installed had some kind of error/warning that required a hack, or version contortion. I naively thought I could webpack with electr…
> Me too! I dread package upgrades because it can instantly turn into an all-hands-on-deck emergency, and these are just the stand-alone packages, not all the ones I mentioned above. To all package manager developers: make sure you have a rollback function, and make sure it is flawless.
Re: Webpack 5
#123Version 5 and this tool still has absolutely awful UX. I have no problem configuring Webpack, but it's ridiculous that: - it needs two plugins to generate CSS files [1], when the homepage lists it as one of the supported outputs in front and center; [2] - it needs a plugin have a non-trash output log. [3] Parcel was supposed to fix the situation, and in many cases its UX is an order of magnitude better, but in exchan…
Re: Webpack 5
#124Earlier quoted context omitted.
Same, and it's just layer on layer of extra tooling and complexity. Typescript, Babel, Webpack, JSX, TSX, etc, etc. It gets in the way of development as much as it helps.
Deno does away with most of the tooling configuration. You get linter, bundler, docs generator, formatter, watcher, version manager, std library, inbuilt tests, and many things that you would otherwise source from third parties in node ecosystem. Support for webgpu and local storage incoming. Makes it a delight to write scripts. You can also scope them by permission. https://deno.land/ Great community: https://discor…
Re: Webpack 5
#125Earlier quoted context omitted.
> modern javascript ecosystem. I recently was convinced to start using a packer (webpack, parcel) and was blown away by the hoops people have to jump through to make stuff work. I've been spending an hour or so a day coming up to speed for the past few weeks, and every yarn/npm package I installed had some kind of error/warning that required a hack, or version contortion. I naively thought I could webpack with electr…
To me what’s interesting is that ESBuild (which is a Go based JavaScript bundler) has come out of nowhere in a relatively short period of time, and it’s basically already better than any of the existing JS JS bundlers. Not just faster: it also has a radically simpler UI.
I have written JS since 1997 and kept up with ES6 and so on over the years. Used it in frontend until now.
The JavaScript-ecosystem just isn't very productive [1] for multiple reasons. The language is untyped. You have no multi-threading. It's hard to debug. You have to spend many brain-cycles on learning Browser-problems, which muddles your understanding of the language. The web-way of: we can fix it and everyone will reload the browser, leads to a "don't care" attitude.
For web/backend this is approachable, though still not good.
For build-systems this is terrible. Why? Because if a bug shows up in a build-system you stop a million developers from being productive. The bug won't get fixed right away, most will just work around it, use different plugins, copy/paste yet another webpack config etc.
Plus JavaScript tends makes people realized what FP is, and they all start putting functions in their functions and making everything modular and plugin-able. (See high-order-components in React). While this can be nice, it leads to even more confusing bugs.
Writing plugin-architectures is hard in any language. Writing it in JavaScript is a recipe for disaster. Hence the modern JS-ecosystem.
[1]
Google: nullpointerexception -> 4.360.000 results
Google: undefined is not a function -> 800.000.000 resultsRe: Webpack 5
#126Earlier quoted context omitted.
To me what’s interesting is that ESBuild (which is a Go based JavaScript bundler) has come out of nowhere in a relatively short period of time, and it’s basically already better than any of the existing JS JS bundlers. Not just faster: it also has a radically simpler UI.
That is because it is NOT written in JavaScript. I have written JS since 1997 and kept up with ES6 and so on over the years. Used it in frontend until now. The JavaScript-ecosystem just isn't very productive [1] for multiple reasons. The language is untyped. You have no multi-threading. It's hard to debug. You have to spend many brain-cycles on learning Browser-problems, which muddles your understanding of the langua…
> Google: undefined is not a function -> 800.000.000 results
You didn't put quotation marks around the second, and the first has no spaces, so this is not a fair comparison. "undefined is not a function" with the quotation marks has 449,000 results.
Re: Webpack 5
#127Earlier quoted context omitted.
> modern javascript ecosystem. I recently was convinced to start using a packer (webpack, parcel) and was blown away by the hoops people have to jump through to make stuff work. I've been spending an hour or so a day coming up to speed for the past few weeks, and every yarn/npm package I installed had some kind of error/warning that required a hack, or version contortion. I naively thought I could webpack with electr…
To me what’s interesting is that ESBuild (which is a Go based JavaScript bundler) has come out of nowhere in a relatively short period of time, and it’s basically already better than any of the existing JS JS bundlers. Not just faster: it also has a radically simpler UI.
This statement assumes that there's basic feature parity between ESBuild and tools like webpack, which is straight up false.
Re: Webpack 5
#128Earlier quoted context omitted.
I frequently have to rerun `npm i` when it fails for seemingly spurious reasons. We used to laugh at Windows years ago, when the solution was so often "turn it off and on again", but it's basically what you need to constantly do with tools like npm and webpack.
Yarn is much better in this regard. I'd thoroughly recommend it. It's drop-in compatible (except it will generate it's own lock file), so it's pretty easy to try it.
Re: Webpack 5
#129Earlier quoted context omitted.
I like your advice, but I think there is a reason for the complaints. An indefensible complexity has become the new normal. And it's what many people are forced to suffer through at work. If having a chorus of complaining dissenters on HN threads sways even a small percentage of people to take simpler approaches, it has done some good.
Dissenters are almost always people who haven't spent enough time in the JS ecosystem to understand why we need the tools we need to be successful. If you want to build a web app, you must target javascript and the browser. There are so many backend programming languages that enables developers to figure out their preferences. I get it, if I didn't have a choice but to build every web API using rails I think I would…
Stop conflating the NPM ecosystem with JS.
Re: Webpack 5
#130I have to sing some praises for Webpack for a second. I work at a company with a large (> 10k files) old (> 10 years) JS codebase. It used to rely on a home-grown build tool, but making our builds both fast and modern took the time of multiple full-time engineers. Webpack isn't "fast" like Rust is fast, and it's not old enough to be as well-documented or understandable as I'd wish, but: 1. it is flexible enough to fi…