Parceljs is a zero configuration build tool for the web.

Installation

yarn add --dev parcel 
npm install --save-dev parcel
ni --dev parcel # https://github.com/antfu/ni

Web App

npx parcel src/index.html

Now open http://localhost:1234/ in your browser to see the HTML file you created above.

Library

package.json

{
  "name": "my-library",
  "source": "src/index.js",
  "main": "dist/main.js",
  "devDependencies": {
    "parcel": "latest"
  },
  "scripts": {
    "watch": "parcel watch",
    "build": "parcel build"
  },
}

Basic config

It’s a zero config build tool by default. However, if needed, configuration can be shared by publishing a npm package with a .parcelrc file.

{
  "extends": ["@parcel/config-default", "parcel-config-xml"]
}
0 Comments for this cheatsheet. Write yours!