Parcel

kartik goyal
1 min readJul 9, 2023

--

Parcel npm

It is bundler.

Parcel features
1.easy to use.
2.MINIFY
3.dev and production BUILDING
4.create and start a server
5.hot reloading — hmr — hot module replacement
6.clean code — remove console from build field, change variable names. etc
7.create .parcel-cache (usage faster reload of build) and dist (store our production build)
8.optimize image
9.use file watching algorithm (use in reload) — c++
10.caching while development
11.super fast build algorithm
12.https on dev using — https parameter
13.port number using -p, — port <port> parameter
14.consistent hashing algorithm
15.zero config
16.compression
17.compatible with older version of browser as well.
To ignite a app using parcel: npx parcel <entries>
To watch (used while building library or backend): npx parcel watch <entries>
To create single production build: npx parcel build <entries>

Entries:
# Single file
parcel src/index.html

# Multiple files
parcel src/a.html src/b.html

# Glob (quotes required)
parcel ‘src/*.html’

# Directory with package.json#source
parcel packages/frontend

# Multiple packages with a glob
parcel ‘packages/*’

# Current directory with package.json#source
parcel

--

--

No responses yet