An attempt to upgrade to Webpack 4
gist.github.com
gist.github.com
Webpack is one of these tools I can't imagine working without.
> I can say that we're working to make sure there will never be another webpack release that suffers from the same kind of documentation shortcoming
We still have time to make sure this release has good docs. Please don’t give up on it just yet!
Can we make some task issues on github that ask people to document a portion of the code/process?
I would say this though: Webpack (and in general the current JavaScript-way of building) is one of those build systems that invite programmers to put a lot of stuff into their project builds plus a lot of programmers rely on templates or generators that gives a lot of code that they never bother to understand.
That is a recipe for stuff that is hard to upgrade and hard to maintain.
It's fair to say that there were problems in the earlier APIs, but if that's the case, make changes gradually, even create an RFP process, tease/market your API change proposals to get feedback from people who might say "this is not something we can adopt easily, but you could add this param for backwards compatibility." It'll take longer to get to an API that feels "perfect," but it makes for a stronger culture.
[0] https://github.com/ReactTraining/react-router/blob/master/pa...
Webpack 4 has been in beta for a while but not enough people tested it on real projects, evidently.
Perhaps the naming is sending the wrong message? "Beta" sounds incomplete and subject to change; I certainly don't make a habit of introducing betas to serious projects unless there's something in them I'm desperate for.
An extended period of Release Candidate versions could give end users more confidence in adoption. This naming implies that the product is finalised and will be released as-is barring serious bugs. It's a small thing, but maybe giving end users the feeling of being early adopters rather than beta testers could increase uptake in this final critical stage.
https://reactjs.org/blog/2016/02/19/new-versioning-scheme.ht... (skip to the major versions and avoiding cliffs part)
[1] https://medium.com/webpack/webpack-4-beta-try-it-today-6b1d2...
[2] https://medium.com/webpack/webpack-4-released-today-6cdb9947...
https://medium.com/@daveford/react-router-alternative-switch...
Like or hate Ember as a framework, the team has developed some very good release processes and practices a lot of us could learn from.
We're in a new world of sustainable open source software development, enabled by services like Patreon and this one.
Maybe it's petty, but as someone who works on several open source projects without reimbursement, I hope that such "hefty" funding leads to better documentation, better community support, and cleaner upgrade paths. Webpack is notoriously fickle and confusing when it comes to configuration, and at a glance Webpack 4 doesn't seem to have helped with that. Although I certainly appreciate performance improvements.
Can I request that funds be diverted into community support and enforcing clean writing across documentation pages? That's what Webpack needs most, and has always needed, by far over any core API changes.
While I certainly welcome this new trend I wouldn't exactly call sub-45k "hefty". That's far below what the author could presumably make working for one of the big shops, and doesn't exactly leave much to "divert" if the author has any plans to pay rent, buy food, etc.
As stated it's a great and promising trend, but I wouldn't be too hasty in calling for the author to start redistributing a fairly minimal income. That's barely enough for one person, let alone "staff".
This was verbatim my thinking when evaluating Vue 2 a while back. Its reliance on Webpack or Browserify for optimal use really gave me pause. I could just see myself losing days trying to figure out which bit got flipped to stop its working.
Vue 2 was new at the time as well, so I wasn't sure about adoption, ecosystem, and/or the maintainers' committment. Looking back, I would've rolled the dice. But, all of this to say glad I'm not alone in that black boxes give me pause in a world where everyone seems to rush headlong into the next big thing, ceding ever more control.
Mind elaborating on what you mean by "for optimal use"? For example, I use Brunch with Vue 2 and it seems to work fine.
So, how does vue-brunch work? It declares the Browserify plugin as a dependency, and wraps it.
Why did you stop using them? Gulp is still active. It gets 4M downloads from npm each month. If you like it and it does what you need then you should definitely carry on using it.
Why do front-end application frameworks (e.g. Angular, and even React) and build tools constantly feel the need to reinvent what they just reinvented? Don't people (users and developers alike) recognize and tire of the churn?
Stepping back though, a thread like this appears on HN at least once every few months, so I guess this is just par for the course.
In the JS world different layers feel very closely bound and it isn't usually clear at all how to leave out things which are (mostly at some level) optimisations.
That isn't great when things go wrong.
Well, except seemingly learning from the mistakes made when introducing breaking changes.
I not being a cynical jerk bashing on WebPack in particular here. I use it every day and am grateful for its existance, and look forward to the point where migrating to version 4 is going to be relatively painless, at which point I'll actually give that another try.
But on the whole, it's like nobody in the JS world seems to learn from the mistakes of other JS projects and they have to make them again themselves.
Yeah.
One day.
PS. I do miss the days when you can just read a book and `man` your way around the dev environment.
They're updating the documentation. Webpack is awesome and v4 is a great update and I highly recommend people try it out.
Even though I don't really use much JS, I still got a real kick out of reading this.
If I'm being honest, there's been times that it's perhaps been the worst dev experience I've endured in the last decade.
Can we use Parcel as a replacement yet?
https://github.com/parcel-bundler/parcel/issues/378
I don't see how this is really possible given the relatively high usage level of CSS Modules, but whatever. I'm forced to stick with Webpack for the time being.
Another complaint for me is how all tutorials, boilerplates etc mingle nodejs server and react/angulas/vue deps and code where all I want is frontend code and build and I have to remove things by trial and error.
Luckily the bad also comes with the good. Adding and upgrading components off npm in a webpack project is almost always a breeze.
At the end, from all the features your users could care about, your webpack version is not one of them.
The reason I upgrade so often is they actually make meaningful fixes. Bugs that I find tend to be in github issues as closed and available in the current release. Hence the pain of upgrading.
I did that when webpack 3 was released and now I'm two versions behind.
Hi all,
We appreciate the feedback. So whether you care to know or not I'll explain where we stand as a project for our docs.
So in this major release we want to try different ways to impact as many users as possible. So this time we consiously put priority on working directly with framework and tooling authors like angular, react, preact, vue to ensure they were unblocked on implementing v4.
With this we decided: since plugins and loaders will also need time, we will give them a month and release our final version without breaking changes from RC. However I as a maintainer orchestrating all of our separate ecosystem, docs, and teams didn't realise we had been behind on contributions and work from our docs and when the 30 day window elapsed v4 shipped as promise.
To not hold back v4 with docs is an organizational and communication error on my part and maybe even a side-effect of juggling my full-time job at Microsoft and the 120-140 hours I spend a month on webpack.
I'm more then willing to own this, and for anyone frustrated, its on me and I'm sorry. However we grow and improve after any mistakes we make. So, we have some takeaways that we will build on for our next Major Release.
A complete migration guide will be a primary shipping dependency for any future Major version of webpack going here forward. We learned that instead of focusing on frameworks as heavily to provide impact and upgrade paths, (which not have all done this yet), that instead focusing on content accessible to everyone is a far more impactful result. For now, we have the PR pending for our docs upgrade and I'll likely spend the majority of my free time ensuring we have it ready to release as soon as possible. Thank you all for being reasonable and patient with this.
Major version releases like webpack 4 are much less likely to happen. This major release included the rewrite in our plugin system, which is the cause of incompatible loaders and plugins. We have no plans to rewrite it again as it is exactly where we need it to be in terms of performance, capabilities, etc. Therefore, look to most future Major versions to be less severe and impactful to loaders and plugins.
I plan to spend much more focus on ensuring all of our separate teams are communicating for releases by coordinating all hands ship meetings. This ensures that we are on the same page and everyone is aware what each team has a dependency on.
We actually only do have one full time engineer. And have attempted to fully fund a documentation team to work on it full time! It takes a considerable amount of effort to do right. And so thanks for understanding while we continue to work on it. Contributions are always welcome along with constructive feedback.
Regardless, we appreciate as always support the positive comments we've seen here but also the actionable criticisms. It probably sounds redundant but we really stress the high bar and expectations that are set for us in the ecosystem as so many of you rely on webpack to ship your products and solutions to the web. We will keep on improving as we have since 2012 and hope you all continue to help us along the way.
Sean + webpack Team (@TheLarkInn)
I certainly didn't mean to bring you down or disparage the work of the webpack team/project in anyway. For me, the way the gist itself was written was just too funny.
Anyways, thank you for all your hard work.
Thank you for being reasonable and patient; that's certainly not been the case for "us all" here and on reddit. I've seen some pretty vile and entitled comments.
Unfortunately, release management is hard. I hope you'll get a better grip on it in the future. We all have to learn somewhere, and these things can unfortunately pretty much only be learned in practice.
If this were React, you would have got docs with a release.
Choosing to release before documentation is done, for a tool developers are supposed to use as a black box, which has a lot of strange configuration that is required, is a really strange choice for something with so many breaking changes.
[0] https://www.npmjs.com/package/webpack
[0] https://gitlab.com/Flockademic/Flockademic/issues/306#note_6...
I gave up and ended up using Rollbar.
More broadly, I often see developers stay on the cutting edge when they don't have a security or feature need to, then complain about it.