Michael Anhari

Goodbye webpack?

A cute dachshund standing in a box

The JavaScript community has made so many strides in improving the developer experience since I started learning web development in 2014. Being responsible for browser support is not an easy task. However, with the widespread adoption of evergreen browsers, the JavaScript community has been able to ship a lot of quality of life improvements over the years as we've been able to drop support for dated browser versions.

One of those steps was the invention of webpack, which allowed the stitching together of all kinds of things to deliver to the browser in a single bundle. It quickly became the defacto standard and was adopted by both the Ruby and Elixir communities, but it came with new issues of its own. Long compile times, complex configurations, breaking builds, etc.

It looks like the days of webpack being the default method of shipping JavaScript for Rails and Phoenix is coming to an end soon. The Rails team has built a gem that whill allows Rails 7 to take advantage of import maps, and the phoenix team has started the move to esbuild in version 1.6. Some developers might be tempted to say "good riddance", but I think it's important to remember that it solved the problem we faced at the time. Time passed and now we have more options. So, thank you webpack.

Besides, depending on the JavaScript needs of your application it still may be your best bet. But, as a developer who tends to write mostly server-rendered apps, a path to reducing frontend complexity is a welcome one.

Newsletter

I'm working on sending out a weekly newsletter. I'll make it as easy as possible to unsubscribe at any time.