6 ms·
What's the matter with Webpack? It carries quite a lot of advantages, like tree-shaking, code splitting, and lazy loading. These are real, tangible performance
by Jorge1o1 8y ago
What's the matter with Webpack? It carries quite a lot of advantages, like tree-shaking, code splitting, and lazy loading.
These are real, tangible performance benefits, so I'm going to need some kind of compelling evidence as to why avoid Webpack.
- untog 8y agoConfiguring it is a giant time suck. Particularly if you want to do hot reloading and all that kind of stuff. I'm a big fan of Parcel for 90% of the things I do. It just works.
- s_y_n_t_a_x 8y agoWebpack works well without any configuration. The nice part is you can do advanced stuff with it if you so choose.
- mattbreeden 8y agoIt does just work. Until you want to use something that the core devs don't use. Like having the most popular front end framework be unusable for at least 6 months: https://github.com/parcel-bundler/parcel/issues/645 https://github.com/parcel-bundler/parcel/issues/645 Often you'll need to hope some third party made a plugin or make one yourself, which isn't really any different than using webpack, but the webpack ecosystem is much larger. I struggled through parcel for a long time before I switched to Webpack 4 and had all of my existing build system and some additional niceties working in <45 minutes (probably 30 min of that was just reading the docs).
- ricardobeat 8y agoLooks like that particular issue was closed in July 2018? Also, anybody who considered that feature important enough could have fixed it. It's not rocket science. Certainly 10x easier than when that magical something in the webpack build chain breaks.
- mattbreeden 8y ago> Looks like that particular issue was closed in July 2018? Yes, after being open for 6 months. > Also, anybody who considered that feature important enough could have fixed it. It's not rocket science. First off, maybe- but I was responding to the comment of 'it just works', so that's not relevant. My entire commentary was on 'it just works'. It doesn't really 'just work' if users have to implement their own plugins and fix their own bugs on super popular JS integrations. Second off, a user did fix it, and it took the devs a month to respond to the PR- so you're still at the mercy of the core devs. > Certainly 10x easier than when that magical something in the webpack build chain breaks. And this I'd just have to disagree with you on. Webpack has way more eyes and as a result I have had one issue (bug) with it which had already been fixed. I had many issues using Parcel beyond the one I linked of the most popular front-end framework not working.
- ggregoire 8y ago> Configuring it is a giant time suck. But Webpack is such a time saver once configured. Same goes on when you have to setup a Docker and some chef/puppet/ansible scripts.
- neurostimulant 8y agoThis is why I just use create-react-app and never bother to configure webpack manually. Create-react-app is getting better these days and I haven't found any reason to eject yet.
- phpnode 8y agoWebpack is virtually indispensable, it has a poor reputation because the docs weren't great in v1.x and because it takes some effort to understand and configure correctly. When it's configured it's rock solid and it rarely needs touching again. I have this theory that people dislike it because that complexity comes front loaded - the most fun part of any new project development is right at the start and if you're spending time setting up webpack then the developer perceives that as frustrating time wasted rather than an investment in the project that pays off long term. A big part of create-react-app's success is because it means the developer can get started right away and not have to worry about that.
- deleted 8y ago[deleted]