LinuxCommandLibrary

parcel

TLDR

Start development server

$ parcel [index.html]
copy
Build for production
$ parcel build [index.html]
copy
Specify output directory
$ parcel build [index.html] --dist-dir [dist]
copy
Watch mode without server
$ parcel watch [index.html]
copy
Specify port
$ parcel [index.html] --port [3000]
copy
Build library
$ parcel build [src/index.js] --target [node]
copy

SYNOPSIS

parcel [command] [options] entries...

DESCRIPTION

Parcel is a zero-configuration web application bundler. It supports JavaScript, CSS, HTML, images, and other assets out of the box with automatic transforms.
Parcel uses worker processes for parallel builds and has built-in dev server with HMR.

PARAMETERS

build

Production build.
watch
Watch without server.
serve
Development server (default).
--dist-dir dir
Output directory.
--port port
Dev server port.
--target target
Build target.
--no-cache
Disable cache.
--no-source-maps
Disable source maps.

FEATURES

$ - Zero configuration
- Hot Module Replacement
- Code splitting
- Tree shaking
- TypeScript/JSX support
- CSS/SCSS/LESS support
copy

CAVEATS

Parcel 2 has different CLI than v1. Cache in .parcel-cache. May need @parcel/config-default.

HISTORY

Parcel was created by Devon Govett in 2017 as a zero-configuration alternative to webpack.

SEE ALSO

webpack(1), vite(1), esbuild(1), rollup(1)

Copied to clipboard