Skip to content

Releases: parcel-bundler/parcel

v2.6.1

17 Jun 19:36
Compare
Choose a tag to compare

This release includes bug fixes:

  • JavaScript
    • Fix issue with conditional dependencies based on process.env - Details
    • Fix transformation of import/requires wrapped into Promise.resolve() - Details
    • Fix object literal shorthand with imported variables - Details
    • Fix imported values in computed optional member expressions - Details
    • Bump SWC to fix issue with missing parenthesis in optional chaining call - Details
    • Bump SWC to fix helper imports in Node ESM libraries - Details
  • Resolution
    • Add missing invalidateOnEnvChange to resolver - Details
    • Fix importing node_modules packages in glob resolver with sub-paths - Details
    • Error when external dependencies in libraries have incompatible semver ranges - Details
  • Web Extensions
    • Fix HMR for web extensions - Details
    • Fix web extensions issues with Safari - Details
    • Fix declarative_net_request property in web extension manifest - Details
  • Dev Server
    • Fix browser caching issues with dev server - Details
  • TypeScript
    • Fix path separators on Windows - Details
  • CSS
    • Bump Parcel CSS to fix issues with libc field in package.json - Details
  • Core
    • Fix atomic file writing race condition - Details
    • Bump lmdb dependency to fix multi-threading issue - Details

v2.6.0

25 May 13:42
Compare
Choose a tag to compare

Blog post: https://parceljs.org/blog/v2-6-0/

Added

  • Add React error overlay to display pretty runtime errors like Create React App - Details
  • Support for source maps in HMR updates - Details
  • Support for scoping variables in CSS modules - Details
  • Support for custom CSS modules naming patterns - Details
  • Support for node_modules packages in @parcel/resolver-glob - Details
  • Add support for defining compilerOptions in Vue config - Details
  • Add support for Vue 3 <script setup> - Details
  • Add support for gif, tiff, avif, heic, and heif images in @parcel/transformer-image - Details
  • Add support for animated images (i.e. gifs, webp, etc.) in @parcel/transformer-image - Details
  • Support for missing fields in web extensions manifest v3 - Details, Details
  • Improve elm compiler error output - Details
  • Support for useDefineForClassFields option in tsconfig.json - Details
  • Add --hmr-host CLI option to set HMR host independently from dev server - Details

Fixed

  • Update lmdb-js. Fixes Node 18 support - Details, Details
  • Update napi-rs to v2 - Details
  • Fix SWC targets for older browsers - Details
  • Add SWC error handler to fix panic during transpilation - Details
  • Update SWC. Fixes issue with Symbol.toStringTag - Details
  • Bump SWC to fix spreads of imported symbols - Details
  • Correctly emit warnings for unnecessary PostCSS plugins in package.json - Details
  • Fix typo in error message - Details
  • Remove duplicate values in graph APIs when getting connected node ids - Details
  • Fix Pug support in Vue files - Details
  • Fix export declare syntax in generated TypeScript definitions - Details
  • Preserve correct this for named/default imports - Details
  • Fix hoisting for optional chaining member expressions - Details
  • Fix issues with web extensions - Details
  • Reload the closest package.json to an asset if it's a package entry to fix sideEffects - Details
  • Only emit non static import bailout warnings for variables which correspond to a * import - Details

v2.5.0

21 Apr 14:28
Compare
Choose a tag to compare

This release includes new features, including improved Web Extension support and better output for Node.js targets, as well as upgrades to SWC and Parcel CSS, and many bug fixes. Thanks to everyone who contributed!

Added

  • Add support for Web Extension manifest v3 - Details
  • Rewrite __dirname and __filename to refer to the original path when building for Node.js targets - Details
  • Generate codeframe positions for JSON5 - Details
  • Add $schema support in web extension manifest - Details
  • Add support for in expressions with process.env, e.g. 'foo' in process.env - Details

Fixed

  • Updated SWC. - Details + Details
  • Update Parcel CSS to v1.8.1 - Details + Details
  • Fix diagnostic message - Details
  • Disable react refresh for library targets. Fixes "Asset was skipped or not found" error. - Details
  • Don't process inline <style> elements as CSS modules - Details
  • Fix issue with multiple images in srcset attribute - Details
  • Fix peer dependencies - Details + Details
  • Scope hoisting: Fix wrapping when any ancestor asset is wrapped - Details
  • Scope hoisting: Don't insert unused requires that aren't registered anywhere - Details
  • Scope hoisting: Fix wrapped assets importing their own namespace - Details
  • Fix issues with resolving symbols - Details
  • Fix loading .env files when entries are specified using "source" field in package.json - Details
  • Correctly remove orphaned non-tree subgraphs - Details

v2.4.1

31 Mar 14:59
Compare
Choose a tag to compare

This release includes bug fixes.

  • Fix :export in CSS modules
  • Don't remove unused classes or @keyframes when a CSS module is processed by postcss
  • Fix bundling issue with CSS modules where unintended side effects from a different page could be run
  • Fix crash with CSS in multiple environments
  • Update Parcel CSS. Fixes issues with ::-webkit-scrollbar, list styles in CSS modules, @-moz-document, and more. See release notes.
  • Update SWC. Fixes an issue with parenthesized expressions following a return statement.

v2.4.0

22 Mar 14:17
Compare
Choose a tag to compare

This release updates Parcel's default CSS transformer and minifier to use @parcel/css! This offers both improved both build performance and better minification. It also brings automatic transpilation of CSS for your browser targets, just like we have for JavaScript – no configuration needed.

For most projects, this update should be seamless. Read our blog post for more upgrade instructions, and check out the updated CSS docs for full details on all of the new features.

In addition, this release includes several other improvements and bug fixes:

Added

  • Replace typeof before dead code elimination to improve bundle size - Details
  • Human readable file size in bundle analyzer report - Details
  • Improve emoji support detection - Details
  • Enable parsing static class initialization blocks - Details
  • Use PORT environment variable from .env files - Details
  • Use new react-jsx transform in React 16.14.0 - Details
  • Use relative path for bundle labels in bundle analysis - Details
  • Load dynamic imports at higher network priority in non-ESM builds - Details

Fixed

  • Pin lmdb to 2.2.3 - Details
  • Prevent term-size from being bundled - Details
  • Fix cache when non-ascii chars are used in path - Details
  • Bump SWC. Fixes issue with String constructor. - Details
  • Fix DCE with PURE comments - Details
  • Escape double quote of url value in CSS url() - Details
  • Fix documentation comment in API - Details
  • Fix package.json source field resolution with pnpm - Details
  • Fix errors.map is not a function - Details

v2.3.2

18 Feb 15:52
Compare
Choose a tag to compare

This fixes an issue with auto installing node builtins where the npm package has the same name as the node builtin itself. See #7697.

v2.3.1

10 Feb 15:57
Compare
Choose a tag to compare

Followup release to v2.3.0 to improve the error message shown when auto install is disabled (e.g. in CI environments) and a node polyfill is needed. This may occur for example when using automated dependency upgrade bots like renovate/dependabot.

This also fixes a bug where auto install did not work correctly in some cases, and pins all parcel dependency versions so that it is easier to pin parcel to a specific version in your project.

v2.3.0

09 Feb 16:44
Compare
Choose a tag to compare

This release reduces the number of npm dependencies needed by Parcel by over 60%. This builds upon previous work in 2.2.0, so combined Parcel now installs over 70% fewer dependencies! This is accomplished by:

  • Pre-bundling some dependencies with Parcel itself rather than loading them from npm. This is done for packages that are small and internal to Parcel (i.e. you don't interact with them directly in your project). This reduces maintenance burden for users of Parcel.
  • Auto installing node builtin polyfills on demand (e.g. buffer, stream, etc.). These are rarely used but account for a large number of installed dependencies. Now, when you use one of these, or a dependency in your project does, it'll be installed into your project on demand.
  • Removing built-in Babel and PostCSS modules dependencies, and installing them into projects on demand, only when actually used.

We will continue reducing Parcel's footprint in future releases by further reducing our use of dependency-heavy ecosystems such as PostCSS as we replace them with Rust-based equivalents.

Other changes

  • Support React 18 prereleases and experimental versions with automatic JSX runtime - Details
  • Fix @swc/helpers in non-module scripts - Details
  • Fix auto installing dependencies in PNPM monorepos - Details

v2.2.1

17 Jan 17:34
Compare
Choose a tag to compare

Fixed

  • Fix background image data urls missing quotes - Details
  • Fix development builds not downleveling nested selectors with @parcel/css. Now Parcel has default modern browser targets. - Details
  • Upgrades htmlnano to v2 to remove uncss which had a dependency on a vulnerable old version of PostCSS - Details
  • Upgrades postcss-modules and removes css-module-loader-core with old PostCSS dependencies - Details
  • Upgrade Vue compiler - Details
  • Upgrade SVGR to v6 - Details
  • Upgade JSON5 to v2 - Details
  • Don't discard invalidations when transformer throws an error - Details

v2.2.0

12 Jan 15:57
Compare
Choose a tag to compare

Added

  • New @parcel/transformer-css-experimental plugin, which is powered by @parcel/css - Details

Fixed

  • Updated node-forge to 1.0.0 to fix security vulnerability