News for hackers. Stuff that matters.
Re:Preact: Fast 3kb React Alternative with the Same API, Com... by emilsedgh on Saturday December 12, 2020 @04:23AM (#25396984)
Webpack has some serious positive side effects:

1-2 times a year when I go to update our app's Webpack, in a matter of 3-4 days I:

1. Get up to date on all recent developments in the world of javascript, babel, esbuild, typescript, eslint, webpack, jest and all their plugins

2. Get the chance to browse through hundreds of fresh github issues while they are still open!

3. Open a few new pull requests

4. Find out about tens of of plugins that are not being developed anymore and their new replacements which are almost the same only with a new name and slightly different API!

5. Give my laptop and build server's CPU's a good go

6. Call my therapist

It's a wonderful opportunity to keep life on edge.

Re:Preact: Fast 3kb React Alternative with the Same API, Com... by IgorPartola on Saturday December 12, 2020 @06:58AM (#25397704)
This is too real. I don’t use webpack directly, only the way vue-cli bundles it, but still it’s a sort of blessing and curse. It is also dog slow for what it’s doing: even something like make can cache compilation objects and make sure that for example Bootstrap’s SCSS doesn’t need to be recompiled every time I update the background color of my app in my own stylesheet. And while speed measuring plugins exist, I am still at a loss at how to optimize a build of a simple SPA where my code all in is less than 10KB and yet it takes like 30 seconds to produce a build. And as you say, when a bug hits, good luck figuring that out.
Re:Preact: Fast 3kb React Alternative with the Same API, Com... by emilsedgh on Saturday December 12, 2020 @11:13PM (#25404254)
Try esbuild instead of babel. Really helps. There is an esbuild-loader that can replace babel neatly.
Re:Preact: Fast 3kb React Alternative with the Same API, Com... by tarsinge on Saturday December 12, 2020 @08:04AM (#25398004)
On the bright side it’s still possible to make a living shipping professional code with simple script dev tags, for now.
Re:Preact: Fast 3kb React Alternative with the Same API, Com... by JMTQp8lwXL on Saturday December 12, 2020 @01:15PM (#25400226)
I've been using webpack since v1 and I can't recall having to open pull requests when periodically upgrading it, or its plugins. Webpack 5 + html-webpack-plugin are kind of a mess right now, though. Webpack, in many use cases, needs html-webpack-plugin but there is only an alpha release supporting v5.

The release was rushed by community pressure, and now we have a half-baked upgrade strategy. I would've happily waited another 6-12 months before v5 was released to get major plugins ready first.

Re:Preact: Fast 3kb React Alternative with the Same API, Com... by brian_herman on Saturday December 12, 2020 @12:22PM (#25399816)
:( I just get notifications when my dependences have vulns on github and I update them with pip install -U <package_name>
Re:Preact: Fast 3kb React Alternative with the Same API, Com... by 4778468d on Saturday December 12, 2020 @05:09AM (#25397212)
Ooohhh snarky.... !