Setting Browserslist for Parcel Bundler

Last updated on 7 Aug, 2022

Parcel is a module bundler. It can bundle all our code and its dependencies which can then be referenced in our project. When generating the bundle, we can specify the browser version we target. We can do that by specifying our browser list under browserslist property in package.json.

Here is an example we need to add in our package.json file:

"browserslist": [
    "last 2 Chrome versions"
  ]

At the time of writing, specifying last 2 Chrome versions creates a bundle that supports 19% of internet users. You can even try with different version string online at browserslist.dev