Recently I've been using Parcel (https://parceljs.org/) for some small web apps I'm developing in my free time.

Parcel is a modern javascript bundler that is used to package a JS app into a single, or multiple files.

We could argue that the state of the art of JS bundler is webpack, but it is also famous to have a cryptic configuration system and the learning curve for it it is clearly steep.

Bundlers are useful in the JS ecosystem because they allow:

  • to split your code in multiple files/modules.
  • the inclusion of CSS or assets directly in the code
  • the use of new JS constructs
  • easy dependency management
  • use of plugins to transpile code

Parcel differs from Webpack mainly for its "zero configuration" approach. basically you can just include parcel in your project and use it from npm scripts.

This of course is good for most of the application that you want to develop, but it gets a bit messy if you need to fine grain tuning your bundling strategy.

Pros

  • zero configuration
  • code splitting by default
  • compatible with react out of the box

Cons

  • some issues when trying to use latest ES7 construct
  • changing config to include extra babel plugins results in more complex config than webpack

Here is my take on Parcel, it is a very good bundle and if you don't need extra plugins, or latest JS construct it is very easy to use and certainly has its own purpose, being a starting bundler for a PoC or a quick prototype, but in production, I would use Webpack all my life!!!

—Read This Next—

Send your name to Mars


Send Your Name to Mars. NASA's Mars 2020 Rover is heading to the red planet. Submit your name by Sept. 30, 2019, and fly along! Your email