npm @rspack/cli 2.0.0-rc.0
v2.0.0-rc.0

latest release: 1.7.11
7 hours ago

Highlights πŸ’‘

Support import.meta.main

import.meta.main is a boolean flag used in ES modules to determine whether the current module is the program’s entry module. It evaluates to true when the module is executed as the main entry, and to false when it is imported by another module. You can think of it as the ESM equivalent of require.main === module in CommonJS. It is useful for running startup logic, initialization code, or CLI behavior only when a module is launched directly.

What's Changed

Performance Improvements ⚑

New Features πŸŽ‰

  • feat: support import.meta.main by @ahabhgk in #13489
  • feat: support expression in import.meta.resolve argument by @ahabhgk in #13523
  • feat: add ModuleGraph.getUsedExports to ModuleGraph by @SyMind in #13519

Bug Fixes 🐞

  • fix(watcher): rename typo recursiron_directories to recurse_parent_directories by @jaehafe in #13510
  • fix: avoid spreading huge dependency iterables by @SyMind in #13517
  • fix(types): allow partial jsc.parser config when detectSyntax is auto by @chenjiahan in #13531
  • fix(swc-loader): fallback detectSyntax auto for virtual modules by @chenjiahan in #13529
  • fix: reset chunk.rendered in incremental build by @hardfist in #13544

Refactor πŸ”¨

Document Updates πŸ“–

Other Changes

New Contributors

Full Changelog: v2.0.0-beta.9...v2.0.0-rc.0

Don't miss a new cli release

NewReleases is sending notifications on new releases.