Webpack 5 is getting near and it felt like a good time to update the book. Although it's still in beta, it seems quite stable already and it's worth experimenting with it. During this work, I went through my long list of TODOs that had accrued since the previous release of the book.
The current version of the book supports both webpack 4 and 5 and I've noted about the new features where possible. The best source for all the changes is the official changelog. Although the release has a couple of major features, including better caching and module federation, in a big part it's a clean-up release that should make subsequent releases easier.
I've rewritten and reworked a big part of the book and modernized it where necessary. The length of the book is roughly the same and I've tightened the content where I felt this was necessary while dropping references that are now obsolete.
If you aren't interested in what has changed, [skip straight to the book](/webpack/preface).
Thanks to Google sponsorship, I was able to go through webpack-merge issues and add first-class support for TypeScript to it. I ended up dropping smart merging from the package as it became impossible to handle all the special cases related to it. Instead, there are now utilities that give you control over details.
One last typing related issue remains and it has something to do with the way webpack and webpack-dev-server typings play with together.
Since the past release, I've been working on occasional client projects and putting a lot of energy behind the React Finland conference as its director. Sadly, the on-going pandemic shattered our plans for the conference and forced us to postpone the physical portion to the next year. In the meantime, we're running online mini-conferences to provide service for our audience. So far we've organized two and there are many on the way.
The delay in webpack 5 release has been problematic as the lack of a stable release means I cannot make a paper release of the book either. I feel it was a good time to update the book, though, as when it goes stable, the paper version can receive a long pending update as well. While waiting for the stable version, I hope to integrate changes based on your feedback to improve the book further.
Especially client work has generated valuable insights which I've integrated to the book. These days people often use a solution such as Create React App and simply skip configuring webpack but at times custom configuration is needed.
Even with CRA, you may find yourself extending the setup using unofficial ways as the defaults won't fit each use case. My client work tends to center around getting webpack configuration under control while improving performance of both the build and the end result.
2.6
#I've released multiple silent releases since the previous public version to improve the book. The past month during which I've been renovating the book has been intense and I feel it's in a much better shape than before.
I still use it as my personal main reference for webpack related things and I've tried to develop the book so that you have strong secondary material with more information available should you want to dig deeper. For me, that's the sweet spot for the book.
The book has received numerous changes and it's not possible to list them all here. Instead, I've compiled a list of the most important ones:
You can find the book below:
A part of the income (around ~30%) goes to Tobias Koppers, the author of webpack. I support his work this way given mine builds on top of his.
My hope is that webpack 5 reaches a stable state soon. While waiting for it, I hope to receive feedback on the content so I can improve it before the next paper release.
Given this book is now in a good shape, I can focus on updating the remaining two books and working on my site infrastructure project. I am currently reworking the technical stack of this site while learning a lot about emerging technologies.
I hope you enjoy the first webpack 5 version of the book!
Note that I'm active at the book Gitter channel if you want to bug me about webpack. You can also ask questions at my AmA.