DEV Community

Hilton Meyer
Hilton Meyer

Posted on • Originally published at hiltonmeyer.com on

Parcel Setup

I'm doing the 100 days of Code Challenge with a bit of a twist by trying to create 100 small projects everyday and not just coding. This had me thinking that if I wanted to create a medium sized application I'll need to start looking at bundling. I don't want to get into webpack but then heard about ParcelJS and ease of setup so.

Setup

One of the reasons I wanted to use Parcel was because it had an easy setup. Having no background with any sort of bundlers and having heard of the nightmares of trying to setup Webpack I was really hoping this would be the case that Parcel setup would not be an issue. I'm glad to report that it was as simple as 11ty in getting up and running.

Install Parcel

npm install parcel-bundler --save-dev

In package.json I setup the dev and build commands to develop with:

"scripts": {
    "dev": "parcel src/*.html",
    "build": "parcel build src/*.html"
}

That was it. I ran npm run dev and was off to the races. I now would like to implement some sort of minimization on the javascript being produced and then also see how I can have 11ty working together with Parcel.

Top comments (0)