TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Webpack 4 Beta released

168 pointsby schneidmasterover 7 years ago

16 comments

skrebbelover 7 years ago
I suspect that the Webpack team thinks that developers&#x27; favourite job is to upgrade tool configurations. I mean, it&#x27;s great that improvements are being made, but breaking changes are not.<p>Remember that the Webpack team has shown to be actively hostile to people who just want to keep their 2-year-old codebases work without doing needless upgrade work. They <i>removed</i> the webpack 1 docs [1], so if you have a few-years-old codebase that you want to get up and running, and somehow you get a webpack error, the message from Webpack is &quot;screw you, upgrade to webpack 3 first and only then we&#x27;ll allow you to read the docs&quot;.<p>I have no reason to not expect the same to happen with Webpack 4, and the inevitable Webpack 5, 7 months from now. Webpack 2&#x2F;3 docs will be subtly removed, retired and forgotten. We&#x27;re all forced to keep doing work to make something work that already worked perfectly fine.<p>Now, I&#x27;m well aware that an angry rant on the internet about the voluntary work from open source contributors is not particularly constructive. I&#x27;ve singled out the Webpack team here, but the reality is that a big part of the web dev ecosystem, across languages, does not care much about backward compatibility. I&#x27;d love for that attitude to change.<p>In semver, every major version is a tragedy.<p>[1] <a href="https:&#x2F;&#x2F;webpack.github.io&#x2F;docs&#x2F;using-plugins" rel="nofollow">https:&#x2F;&#x2F;webpack.github.io&#x2F;docs&#x2F;using-plugins</a>
评论 #16238054 未加载
评论 #16237744 未加载
评论 #16238701 未加载
评论 #16238075 未加载
评论 #16240474 未加载
评论 #16289995 未加载
评论 #16238579 未加载
评论 #16237723 未加载
y0ghur7_xxxover 7 years ago
Do you remember the time when you just copied your file over to the server, and magically everything was deployed? I do. It was a good time. Yes, I am old.<p>In search for something that makes me work like the good old times, but with modern javascript solutions, I stumbled upon mod_pagespeed[1]: it minifies your javascript and html, optimizes images, and more or less does what webpack does (minus the typescript -&gt; js compilation).<p>The good old times are back for me: deploying is now an scp away.<p>For important projects I copy the static assets to the server, let jenkins run integration tests on staging and if everything works as expected just copy it over to production. One less thing to worry about for me.<p>[1]<a href="https:&#x2F;&#x2F;www.modpagespeed.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.modpagespeed.com&#x2F;</a>
评论 #16238029 未加载
评论 #16238069 未加载
评论 #16239155 未加载
评论 #16244287 未加载
评论 #16238048 未加载
评论 #16240502 未加载
评论 #16239654 未加载
评论 #16238433 未加载
评论 #16238010 未加载
评论 #16238585 未加载
fenomasover 7 years ago
These look really solid!<p>For anyone else who was confused by the minimal explanation of the &quot;sideEffects: false&quot; feature, apparently this targets cases where (1) module A exports some code, (2) module B imports from A and exports end points, some of which depend on A, and (3) module C imports code from B that doesn&#x27;t reference code from A.<p>In this situation by default webpack assumes that the code from A might have side effects inside B, but if A declares &quot;sideEffects: false&quot; in its package.json, the tree-shaker will assume it&#x27;s safe to omit module A from the final bundle.<p>Incidentally the end user can also declare in their config that module B should use sideEffects:false, even if the module doesn&#x27;t declare it. Details here: <a href="https:&#x2F;&#x2F;github.com&#x2F;webpack&#x2F;webpack&#x2F;issues&#x2F;6065" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;webpack&#x2F;webpack&#x2F;issues&#x2F;6065</a>
评论 #16238402 未加载
toadkickerover 7 years ago
One of things I absolutely despise about the JS community is this obsession with build tools. JS is meant to be a runtime language and the amount of transpilers, minifiers, uglifiers, obfusicationifiers, is absolutely endemic to the messy state of change the language is undergoing.<p>However with this release I&#x27;m excited to start deleting a bunch of ridiculous build code to make Webpack work. Really a build tool is a tool, it should never be in the way of developing features. I haven&#x27;t enjoyed using webpack until now. No sensible defaults, poor documentation, and no standard conventions. This release changes all of those complaints. A boost for productivity is a win in my book.
评论 #16238436 未加载
评论 #16239372 未加载
评论 #16237581 未加载
评论 #16239833 未加载
评论 #16245239 未加载
评论 #16238061 未加载
评论 #16239726 未加载
评论 #16237825 未加载
dmitriidover 7 years ago
As a web dev I am extremely happy Webpack team changed their stance from &quot;webpack config is the way it is because everyone&#x27;s needs are different and also because that&#x27;s just how Javascript works&quot; to &quot;yes, we can provide sane defaults out of the box&quot;.<p>Aaand that their communication has improved a thousand-fold.
onion-soupover 7 years ago
Jeez tone down them emojis a bit pal. And I&#x27;m seeing black squares on windows 7 anyway
realPubkeyover 7 years ago
Has anyone ever updated a minor webpack-version without having to touch the config? Me not.
评论 #16237710 未加载
评论 #16239138 未加载
评论 #16241919 未加载
评论 #16238606 未加载
评论 #16245307 未加载
pawsover 7 years ago
Two years ago I would have invested some effort to read this thoroughly and try to stay on top of the API changes. I&#x27;m sure it&#x27;s helpful to a lot of folks.<p>For sure I do care about my build toolchain. The nice thing about being a React developer today, is that thanks to create-react-app, more specifically react-scripts [1], I&#x27;m thankful I get to choose to not worry about it. Just like I didn&#x27;t have to worry about 2.0 -&gt; 3.0 last time.<p>Cheers to the CRA maintainers. Thanks for giving me some time back!<p>[1] <a href="https:&#x2F;&#x2F;github.com&#x2F;facebook&#x2F;create-react-app&#x2F;blob&#x2F;next&#x2F;packages&#x2F;react-scripts&#x2F;package.json#L62" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;facebook&#x2F;create-react-app&#x2F;blob&#x2F;next&#x2F;packa...</a>
评论 #16241330 未加载
danjocover 7 years ago
Is there really any point to webpack now that we have http2? I&#x27;m looking for a way to code split all the things and webpack is making that difficult. I want cache performance over download speed now that I&#x27;ve gone mobile only on data.
评论 #16245316 未加载
评论 #16241664 未加载
farnsworthyover 7 years ago
I&#x27;ve been running the alpha, to help get past the Webpack&#x2F;Uglify ES6 support issues.<p>It sounds like webpack-dev-server will also disappear soon, too? (Replaced with a more tightly integrated solution, or?)
评论 #16237821 未加载
unquietcodeover 7 years ago
Oh good. I just finished upgrading my project to Webpack 3. Can&#x27;t wait to do it all again...<p>I&#x27;m all for rapid progress, but the pace of web development is absolutely breakneck.
评论 #16244334 未加载
tjpnzover 7 years ago
A few years ago I was asked by a frontend team to investigate their Jenkins build. What used to take 90 seconds went to 15 minutes and it only started happening when the team switched to Webpack. I recall Webpack being hideously complicated with a lot of the documentation either missing or just plain wrong - no wonder they managed to make a mess of things so easily. Has any of that changed?
评论 #16241220 未加载
评论 #16245313 未加载
RobertRobertsover 7 years ago
I don&#x27;t use Webpack, would it help with regular website dev? Or is this just for web apps?<p>Also, does it really make things faster? What about HTTP2&#x2F;SPDY, do we really care about making everything one file anymore? This seems like a paradigm that is no longer valid (like using tables instead of grid for website layout).
评论 #16240691 未加载
fiatjafover 7 years ago
I use Browserify and it works great.<p>Maybe there are some legitimate cases in which you would prefer Webpack, but I really don&#x27;t understand why have EVERYBODY migrated to Webpack, with all its bloat and breaking changes and build errors and boilerplate.
评论 #16238770 未加载
simoooooover 7 years ago
Emoji in the first title? Emoji in every damn title?<p>Are children developing webpack?
评论 #16238077 未加载
评论 #16237531 未加载
评论 #16237627 未加载
评论 #16237571 未加载
评论 #16237633 未加载
评论 #16238034 未加载
评论 #16237831 未加载
评论 #16238260 未加载
baybal2over 7 years ago
Shameless promotion<p><a href="https:&#x2F;&#x2F;rollupjs.org" rel="nofollow">https:&#x2F;&#x2F;rollupjs.org</a> - JS module loader with tree shaking and async loader that works out of the box.<p>Asynchronous loading and code<p>Take a try if webpack takes toll on your productivity
评论 #16238622 未加载
评论 #16238519 未加载
评论 #16238882 未加载