First of all we will start by understanding What is a Module Bundler ?
A module bundler is a tool that takes pieces of JavaScript and their dependencies and bundles them into a single file, usually for use in the browser. You may have used tools such as Browserify, Webpack, Rollup or one of many others.
Today we will only be discussing about Parcel JS
What is Parcel JS and why should we use it over Webpack or Rollup ??
Parcel is a web application bundler, differentiated by its developer experience. It offers blazing fast performance utilizing multicore processing, and requires zero configuration.
yarn global add parcel-bundler
Many front-end developers have become frustrated with some of the complexities involved with building web apps today. Itโs pretty standard practice to include some kind of build or bundling tool in a front-end workflow, thus many developers have looked into using a front-end tool like webpack/Rollup/Parcel.
But the learning curve for a tool like webpack is steep. Getting started with webpack isnโt easy due to its complex configurations.
This is where Parcel JS Kicks in !!! ๐
Parcel.js is exactly what many newbie developers want, A simple, low-configuration bundler that you can get up and running with quickly without much hustle in learning the tool.
If you want to go in depth about Parcel JS and how to use it in your project check this documentation out form is official website
Meme:
Top comments (2)
Browserify??? Is anyone using browserify these days? I haven't heard of browserify in years.
You didn't answer why do we need a bundler. Why having a bundler become a standard practice?
Webpack offers zero config experience just as parcel does but it become a low-level tool used by framework clis like cra or vue-cli.
When you compare parcel nowadays, you should compare it with vite or snowpack.
Even though they're still called bundlers, bundling - that is combining various resources together for production, become only a part of what they are expected to do. You still want fast production builds, but bundling for production is much rare than providing instant feedback in development. We expect fast development cycle - immediate results produced by the development server after introducing a change in source code.
There are different requirements expected of a bundler:
Short and simple ๐๐, Great work dude ๐พ