github web-infra-dev/rspack v1.7.0-beta.0

8 hours ago

Highlights 💡

🎈 Upgrade SWC

The latest version of SWC enhances the compatibility of Wasm plugins. This means future upgrades of Rspack and SWC will almost no longer break SWC Wasm plugins. Additionally, the SWC upgrade brings a 10% performance improvement to the parser.

✅ Enable lazy compilation by default

Since Rspack v1.5 has stabilized Lazy Compilation, we are now enabling it by default for dynamic imports cases when the target is web.

export default defineConfig({
  lazyCompilation: {
    imports: true,
  },
});

🎯 Stablize several experimental configurations

In the previous releases, the experimental features experiments.lazyBarrel, experiments.inlineConst, experiments.inlineEnum were introduced to enable cross-module inlining optimizations for constants. These optimizations improve minifiers' ability to perform precise static analysis, eliminate unused code branches, and further reduce bundle size.

After thorough validation, we are now promoting these features from experimental to stable.

export default  {
  experiments: {
-   inlineConst: true,
-   inlineEnum: true,
-   lazyBarrel: true,
-   typeReexportsPresence: true,
  },
  module: {
    parser: {
      javascript: {
-      inlineConst: true,
       typeReexportsPresence: true,
      },
    },
  },
  optimization: {
+  inlineExports: true,
  },
}

What's Changed

Performance Improvements ⚡

New Features 🎉

Bug Fixes 🐞

Refactor 🔨

  • refactor: move cacheable macros to rspack_cacheable_macros by @jerrykingxyz in #12393
  • refactor: use atomic_refcell for async_module_artifact by @hardfist in #12408
  • refactor: use swc_experimental on concatenated module by @CPunisher in #12369
  • refactor: change dependencies_diagnostics_artifact to use atomic_refcell by @hardfist in #12415
  • refactor: replace SourceFile with &str and replace Arc<SourceMap> with Rope in rspack_plugin_javascript by @CPunisher in #12404
  • refactor: extract common utility functions to rspack_util by @LingyuCoder in #12447
  • refactor: remove linked_hash_set dependency by @LingyuCoder in #12451

Document Updates 📖

Other Changes

Full Changelog: v1.6.7...v1.7.0-beta.0

Don't miss a new rspack release

NewReleases is sending notifications on new releases.