github web-infra-dev/rspack v1.5.8

14 hours ago

Highlights 💡

Enhanced Tree Shaking for Nested Exports in Destructuring

Rspack now supports more precise tree shaking for nested exports accessed through destructuring assignments.

// lib.js
export * as a from "./a";
export * as b from "./b";

// index.js
import * as lib from "./lib";
// Before: All exports under `lib.a` were retained, only `lib.b` was tree-shaken
// Now: Only the specific property `inner` from `lib.a` is kept; everything else is removed
const { a: { inner } } = lib;

What's Changed

Performance Improvements ⚡

New Features 🎉

Bug Fixes 🐞

  • fix: cjs export require tree shaking by @ahabhgk in #11758
  • fix: should always walk import then arguments by @ahabhgk in #11760
  • fix: should update alias resolution when a higher-priority file is created in watch mode by @SyMind in #11643
  • fix: should analyze correct variable for dynamic import by @ahabhgk in #11768
  • fix: URLPlugin in child compiler by @SyMind in #11785

Refactor 🔨

Document Updates 📖

Other Changes

New Contributors

Full Changelog: v1.5.7...v1.5.8

Don't miss a new rspack release

NewReleases is sending notifications on new releases.