In the beginning, there was HTML, and the tag was
OK, so the web of the 1990s and early 2000s wasn’t terribly elegant. But it was very easy to develop websites. All you had to do was plop some files on an Apache server and point a bit of XML at the appropriate resource. There was no notion of modules, or bundling, or minification, or code splitting. No Gulp or Grunt or Webpack or Broccoli. Just plain old HTML.
What if I told you there was a way to make webdev simple again?
devDependencies, each one prone to change and obsolescence every time the wind turns.
Is my career as a Webpack whisperer at an end?
(cries tears of joy)
src. Want code splitting? Use the official ES6 dynamic import syntax and everything just works.
Of course, modern web applications rely on much more exotic technologies than 2002 Geocities pages, and Parcel has you covered. It can consume TypeScript files, React templates and Vuefiles out of the box. It can handle your usual range of CSS preprocessors and the production build (passing a CLI flag) will minify, optimise and MD5-version-stamp your assets utterly without fuss.
Should you ever need extra functionality - and in my experience so far, it’s been rare - just add a plugin to your
package.json. Parcel will sniff it out and call it automatically. (Why can’t other things be this simple?)
It’s also very quick - almost an order of magnitude faster than Webpack 3.x builds, by my count - which is doubly remarkable: one, that builds taking thirty seconds now take three; and two, that this is somehow the least interesting of all Parcel’s features.
It is not perfect. The bundler is very new and has a few beta-ish bugs; the documentation is sparse and so far tree-shaking is not supported (though is on the project radar). Nevertheless. Working with Parcel in three commercial projects has been an absolute joy, and has now become my go-to default for new projects. Try it sometime!