npm / parcel
parcel
What changed in parcel 1 to 2, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-15.
15 breaking1 security11 new APIs and options6 performance6 behavior and defaults10 tooling4 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initparcel 233 changes
Security 1
Bumps the package to fix a vulnerability.
New APIs and options 10
Adds a dev server option to disable CORS headers.
Compiled bundle contents can be embedded inside another bundle, such as an image embedded as a data URL.
A new plugin type can compress or encode output bundles at the end of the build; multiple compressors can produce versions simultaneously without affecting the final content hash.
Run Parcel with this CLI option to see detailed scope hoisting bailout information and the causes of tree shaking failures.
Prefix URL dependencies with
npm:to resolve them like JavaScript imports from node_modules rather than as relative URLs.Add this compressor to
.parcelrcto emit.brfiles alongside original bundles.Add this compressor to
.parcelrcto emit.gzfiles alongside original bundles.Import the package to access a manifest of generated URLs and a version hash for pre-caching service worker assets.
The XML transformer processes URL references in RSS and Atom feeds and runs embedded HTML through Parcel's HTML pipeline.
A fully extensible plugin system adds well-defined APIs for transformation, bundling, optimizing, and compressing output.
Performance 6
CSS is preloaded as soon as the RSC payload loads, without waiting for it to mount, enabling pre-fetching.
Improves performance of React Server Components builds.
A C++ file watcher uses low-level operating system APIs for fast, granular cache invalidations, including across Parcel restarts.
A new JavaScript compiler written in Rust contributes to Parcel's performance improvements.
In development, Parcel builds only files requested by the browser, improving dev server cold startup times.
Parcel's new Rust source maps library makes source maps faster and more accurate.
Behavior and default changes 4
The cache is more reliable and portable across machines, and automatically tracks configs, plugins, and development dependencies without configuration.
Lossless JPEG and PNG optimization is enabled by default in production; Parcel also supports resizing and conversion to modern image formats.
Parcel uses SWC to transpile JavaScript by default, while still picking up an existing Babel config.
Tree shaking is enabled by default, with support for ES modules, CommonJS, dynamic imports, and CSS modules.
Tooling 8
Parcel automatically splits code and deduplicates common modules into shared bundles that can be loaded and cached in parallel.
Diagnostics include syntax-highlighted code frames, hints, and links to documentation.
Parcel automatically ships modern JavaScript syntax to browsers supporting native ES modules and falls back for older browsers.
Parcel supports building libraries with ES module, CommonJS, and TypeScript definition output.
Improved hot reloading includes support for React Fast Refresh.
Parcel includes an optimizer based on SVGO to minify SVGs and reduce their sizes.
Parcel processes SVG external dependencies, scripts, styles, inline elements, and presentation attributes through the relevant pipelines, and supports SVG-to-JSX conversion.
Worker support includes native ES module workers, worklets, and service worker manifests.
Fixes and other changes 4
Fixes HTML minification incorrectly removing siblings after an <svg> element.
Fixes a cache key clash in the React static packager.
Fixes using inline string transformers with the React static packager.
Fixes macro location information.
parcel 120 changes
Breaking changes 15
Babel configuration overrides Parcel's default rather than merging with it; projects with custom Babel plugins other than Flow need to add @babel/preset-flow.
Parcel no longer transpiles JavaScript by default; set browserslist in package.json to define supported browser targets and enable transpilation.
The --out-dir CLI option is renamed to --dist-dir, matching the distDir package.json option.
The option is removed without a replacement.
Configure bundling packages from node_modules for Node.js targets in target configuration using includeNodeModules, instead of the --bundle-node-modules CLI option.
Log levels now use names instead of numbers: none, error, warn, info, and verbose.
The --no-minify option is renamed to --no-optimize.
The CLI option is removed; specify the output path in package.json instead.
The npm package name changes from parcel-bundler to parcel; update the dependency in package.json.
Use the @parcel/core package rather than parcel-bundler for programmatic use; the API has changed significantly.
Parcel 2 uses SWC instead of tsc for TypeScript transpilation; projects needing compiler options beyond supported options can configure @parcel/transformer-typescript-tsc.
Parcel 2 plugins are configured in .parcelrc rather than being enabled automatically by listing them in package.json dependencies; Parcel 1 plugins are incompatible.
Classic script tags no longer support imports or exports; use type="module" for modules. Module scripts are deferred, and Parcel generates a nomodule version for older browsers based on browserslist.
The CLI option no longer configures the compilation environment; configure targets in package.json, for example with an engines.node or engines.electron field.
Listen for build events through watch's callback, checking buildEvent.type for buildSuccess or buildFailure.
New APIs and options 1
Scope hoisting is enabled by default; use --no-scope-hoist to disable it.
Behavior and default changes 2
When Parcel sees main, it infers the project is a library and uses that value as the output path; remove it for most web apps or set targets.main to false to ignore it.
Parcel's default cache location changes from .cache to .parcel-cache, so update .gitignore or similar.
Tooling 2
Parcel supports preset-env, preset-typescript, and preset-react features automatically; projects using only these presets can remove their Babel config and use Parcel's faster default transpiler.
For non-code asset types without default support, use the URL constructor or a url: import specifier to reference the asset URL.