G to the Square

Geries Handal Profile picture

Occasionally, I write my opinions on software development. By Geries Handal, Github

You don't need webpack

2019-08-06

Use parcel.js instead.

No config needed, HMR is a breeze to setup (done via babelrc) and code splitting is done via dynamic imports, giving you full control programmatically of when to load code.

All started, when I decided to do rewrite of metasong.in originally developed using next.js. Main reason was that I needed a small project where I could play around with design and architecture of UIs, as well of exploring ways of doing SSR.

The problem with ditching next.js is that I need to start from zero with webpack, and that moment it hit me: I had enough, I have webpack fatigue.

So, I decided to try parcel.js and you should also.

It blows my mind that there is so much we need to configure to get a project up and running with webpack. That is why frameworks like next.js are so popular because they just work. I'm guessing that most don't want spends days configuring the building and bundling of your project. People want to create and solve problems with their creations, instead of solving the same puzzle (that is webpack) on every project.

parcel.js is zero config, yes is it strange that you point to a .html file, but isn't what the WEB is all about: HTML

Why not next.js then?

Well, that is a good question.And the framework has make great improvements and is hard to say no. Still, I don't want to get married to a framework just yet. Mainly to avoid jumping many hoops when I need to just to do something that goes against how it is intend to work.

Finally, I want to understand how things work and bundle next.js just abstracts that, in addition opinionated way of structuring the project.

At the end I'm just tired of webpack. Maybe, you are too, leave webpack behind, you don't need it, use parcel.js.

Copyright © 2024 Geries Handal