Live data from Hacker News

Webpack 5

webpack.js.org

81–90 of 182 posts

Re: Webpack 5

#81
I was joking just the other day, could you imagine if someone you worked with came up with the set of design decisions that required webpack + Babel + node_modules ? You would think they were insane and laugh them out of the design meeting, even the company. Maybe it’s time for a reframing - which problem are we trying to solve?

Re: Webpack 5

#82
Reading through the comments here has been predictable. A lot of people complaining about the complexity of the front-end ecosystem. Too many tools, to much configuration, etc.

I’d like to say that you don’t need that complexity. If you just want to write a dumb front-end you don’t need typescript, you don’t need babel, you don’t need pug, you don’t need webpack, etc. If these things bother you, just skip it.

I always start my websites with a simple index.html file and run a `python -m http.server`. That is it. Modern JavaScript has a really good module system that works in all major browser (even Edge), and node. If you want to write type safe JavaScript you can write your types as doc comments and have typescript check it without bundling or compiling. You literally need only two tools to write a website: a browser and a text editor.

I’m not here to tell you that people shouldn’t use these complex tools. Many people configure their front-end environment just fine with webpack, babel, typescript, etc. If they work better that way, that is fine. But if that bothers you, simply don’t do it. There is no reason for you to complain about it.

Re: Webpack 5

#83

We've been using Webpack for a number of years now with our massive webapp. A few months ago we started using esbuild for our development setups. Build times went from ~6 minutes to ~1. This is a sweet spot for us as esbuild is performing really well and made our development much easier. we still rely on webpack for our staging and production builds. The reason for this is esbuild doesn't support a variety of product…

> "uploading bundles to S3" Why are you using the bundler to do that?

Because it could and it knows my assets the best.

Im sure there are alternative methods but with Webpack it's been super easy.

Re: Webpack 5

#84

We've been using Webpack for a number of years now with our massive webapp. A few months ago we started using esbuild for our development setups. Build times went from ~6 minutes to ~1. This is a sweet spot for us as esbuild is performing really well and made our development much easier. we still rely on webpack for our staging and production builds. The reason for this is esbuild doesn't support a variety of product…

ESBuild will transpile to different versions of ES6. It won’t drop down to 5. I assert that you don’t need 5 support because you aren’t actually QAing IE11 and if you did, you’ll learn that it’s actually been broken and no one reported it.

That may not be far from truth. Maybe I will have our people test IE11 and if it's not really working we'll drop it.

Re: Webpack 5

#85

Am I the only one who was annoyed that they made the beta docs the main docs before version 5 was even released?

Not only that, but also with every release links pointing to older versions stop working, breaking stackoverflow answers, blog posts, and a host of other things.

Re: Webpack 5

#86

The past year or so I've moved almost exclusively to backend at work (from Vue frontend) and simultaneously switched to vanilla JS for all new side projects. For those I use native ES modules heavily for internal code, and use very few external dependencies and import them as global scripts like a heretic. Heck I often don't even use npm for node projects anymore. For my latest project I'm even trying to make the ent…

People tend to recommend alpinejs for very light js interactivity without a full framework. The tailwind folks use it a lot

Re: Webpack 5

#87

Reading through the comments here has been predictable. A lot of people complaining about the complexity of the front-end ecosystem. Too many tools, to much configuration, etc. I’d like to say that you don’t need that complexity. If you just want to write a dumb front-end you don’t need typescript, you don’t need babel, you don’t need pug, you don’t need webpack, etc. If these things bother you, just skip it. I alway…

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.

Re: Webpack 5

#88
post #34

I've been putting off learning Webpack for far too long. Can anyone provide some kind of a syllabus to help me figure out what there is to learn about it, starting from almost no knowledge at all? I feel like it's a critical enough piece of modern web infrastructure that it's worth me taking the time to fully understand how to use it and what it's capable of.

https://survivejs.com/webpack/

Thanks, that book likes exactly what I need. Bought it on Kindle.

Re: Webpack 5

#89
post #2

"There is a good chance that upgrading fails and you would need to give it a second or 3rd try." Sad that this has almost become the norm when developing in the modern javascript ecosystem. I dread touching those projects and creating one even more because stuff just rots away and your app might break in days, weeks or If you are lucky months. I'm sure there are better developers out there that can handle all of this…

We’ve banned npm install: It’s simply a party drug and completely unnecessary.

Re: Webpack 5

#90
post #66
post #2

"There is a good chance that upgrading fails and you would need to give it a second or 3rd try." Sad that this has almost become the norm when developing in the modern javascript ecosystem. I dread touching those projects and creating one even more because stuff just rots away and your app might break in days, weeks or If you are lucky months. I'm sure there are better developers out there that can handle all of this…

jQuery and full-page postbacks are my go-to, unless there is an actual need to introduce something else (React, etc). I'm usually conservative in the tools I choose, but I have to be especially conservative with js.

Full page postbacks are not necessary even if you want to go zero dep
Post reply on HN