You don't have to use Webpack

sonnk

Nguyen Kim Son

Posted on November 15, 2020

You don't have to use Webpack

Nowadays, webpack seems inevitable for a web developer.

But for a conventional, i.e., not a single-page application, using webpack can feel awkward because:

  • there's no need to have a single JS file: each page is independent and their JS code needs to be isolated.

  • there isn't much JS code for a conventional web app.

As a web developer, I sometimes feel the urge of adding Webpack to our flow but I just can't justify the utility. Don't get me wrong, I have been using Webpack since its beginning for several SPA projects but it just doesn't add any major productivity boost for our conventional web app.

Sure, with the right configuration, Webpack will help writing the code a bit easier but I'd rather spend the setup and config time on adding features that actually bring values for users. This is even more important for a new project where you want to quickly validate the idea.

Our open-source web app doesn't use Webpack and we never felt the lack of it slows down the development nor affect the code quality.

In fact, we use inline JS and the JS code lives in the same file as the HTML and CSS. That config is nice to work with as you know changes are isolated. In this regard, our page is similar to a VueJS single-file component. And yeah, we use jQuery 😱.

So if you don't find the need of using Webpack in your project and somehow feel shameful about it, don't as you aren't alone!

💖 💪 🙅 🚩
sonnk
Nguyen Kim Son

Posted on November 15, 2020

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

You don't have to use Webpack
webpack You don't have to use Webpack

November 15, 2020