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

This right here is why I actively suggest not using webpack. It's Grunt 2.0 all over again and not worth the mess.

IMO it's the worst choice Facebook could have made for this toolkit, as it breeds some awful habits.




What’s wrong with using webpack under the hood? The problem is webpack being a lower level tool. This is why we abstract it away from you (and we can swap it for something better if it comes along, but actually webpack is pretty powerful).


We discussed this on Twitter Dan, fyi, no need to rehash here.

But they very fact you had to spend time abstracting away WebPack speaks volumes IMO...


Sorry, didn’t realize it was you :-)

>But they very fact you had to spend time abstracting away WebPack speaks volumes IMO...

Speaks volumes about its poor public API. I don’t understand how this this affects create-react-app, really.

But if you can suggest something better that solves the same problems, please do.


As I think I said on Twitter - it's not really that I think something solves the same problems better; it's that one tool shouldn't be solving all those problems (and in fact many of those problems aren't in the JS space at all).

Sort of... think UNIX philosophy vs... I dunno, Windows I guess? With the way it currently does it you are always going to have a horrible public API because the approach is fundamentally flawed.

And that's before I even get into how it solves those problems.

Now is it a bad thing it exists? No, obviously not. I'm glad it does, but we can learn what not to do from it as well.


Who are you? Why do you think you can speak with such authority?


Can you add some clarity to your complaints about WebPack?

What are the similarities with Grunt that aren't worth the mess and what are some of the awful habits that WebPack breeds?

What are your preferred ways to handle modules and build steps in general?


Could you give me some detail on these "awful habits" you mention? As a webpack user, I'm genuinely curious.


Pretty much all the same reasons people railed against Grunt.

It's config heavy for very little benefit.


The only practical reason I can think of for people railing against grunt is that it used the file system for in-between steps and was thus frustratingly slow (a problem that webpack doesn't have).

Code vs config is a huge bikeshed


> Code vs config is a huge bikeshed

Not really. Historically it's been an indication of the quality of a system.


Sorry, this is not true.


I actually use browserify for personal projects. It's ultra simple to get started. My boss insists on using webpack.


If you don't care about the stupid arbitrary bundling system for other assets (like CSS and images) that WebPack has (and you shouldn't: it's an awful code practice) then yes... Browserify is literally better in every way (other than tree shaking)


>If you don't care about the stupid arbitrary bundling system for other assets (like CSS and images) that WebPack has (and you shouldn't: it's an awful code practice)

The “stupid arbitrary” system has a number of benefits. It revs your assets for production automatically with content hashes. It saves you from filename typos because all assets (CSS, images) are part of the same build pipeline. It throws on parse errors in CSS as part of your normal dev flow, not at some later stage. It allows for fast hot reloading of styles in development.

The only downside I’m aware of is that it doesn’t work with some other tools without special plugins or configuration. Well, you have to pick your tradeoffs, right? I’d love to talk about technical tradeoffs of both systems but your comment reads more like a knee-jerk reaction than a technical assessment.


> The “stupid arbitrary” system has a number of benefits.

Yes, it does. Those features aren't exclusive to webpack though (they're really, really, really old features of webdev) and can be replaced by much less silly systems.

I mean literally everything you just listed is better handled by more mature, developed, tools.


+1 for team browserify. It's sad that it appears to be way less popular. Webpack is too much of a magical black box for my tastes.


Really? I find Webpack to be an order of magnitude easier to explain and understand when compared to Grunt.


Yes, but that's not saying much is it?




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

Search: