Skip to content

Comments

fix(hmr): module namespace object should be included via treeshaking mechanism normally#5543

Merged
sapphi-red merged 1 commit intomainfrom
08-01-fix_hmr_module_namespace_object_should_be_included_via_treeshaking_mechanism_normally
Aug 1, 2025
Merged

fix(hmr): module namespace object should be included via treeshaking mechanism normally#5543
sapphi-red merged 1 commit intomainfrom
08-01-fix_hmr_module_namespace_object_should_be_included_via_treeshaking_mechanism_normally

Conversation

@hyf0
Copy link
Member

@hyf0 hyf0 commented Jul 31, 2025

Fixes #5259.

@hyf0 hyf0 force-pushed the 08-01-fix_hmr_module_namespace_object_should_be_included_via_treeshaking_mechanism_normally branch from b3117c3 to e66769a Compare July 31, 2025 18:29
Copy link
Member Author

hyf0 commented Jul 31, 2025

This stack of pull requests is managed by Graphite. Learn more about stacking.

@netlify
Copy link

netlify bot commented Jul 31, 2025

Deploy Preview for rolldown-rs canceled.

Name Link
🔨 Latest commit b3117c3
🔍 Latest deploy log https://app.netlify.com/projects/rolldown-rs/deploys/688bb5f8e206cf0008014580

@netlify
Copy link

netlify bot commented Jul 31, 2025

Deploy Preview for rolldown-rs canceled.

Name Link
🔨 Latest commit 1017c27
🔍 Latest deploy log https://app.netlify.com/projects/rolldown-rs/deploys/688bb65a4e82990008ff6bee

@hyf0 hyf0 marked this pull request as ready for review July 31, 2025 18:30
@hyf0 hyf0 force-pushed the 08-01-fix_hmr_module_namespace_object_should_be_included_via_treeshaking_mechanism_normally branch from e66769a to 1017c27 Compare July 31, 2025 18:30
@github-actions
Copy link
Contributor

Benchmarks Rust

  • target: main(8d7bc62)
  • pr: 08-01-fix_hmr_module_namespace_object_should_be_included_via_treeshaking_mechanism_normally(1017c27)
group                                                        pr                                     target
-----                                                        --                                     ------
bundle/bundle@multi-duplicated-top-level-symbol              1.01     74.7±1.43ms        ? ?/sec    1.00     74.3±1.44ms        ? ?/sec
bundle/bundle@multi-duplicated-top-level-symbol-sourcemap    1.01     85.5±2.05ms        ? ?/sec    1.00     84.4±1.22ms        ? ?/sec
bundle/bundle@rome_ts                                        1.00    112.7±2.71ms        ? ?/sec    1.01    113.6±2.64ms        ? ?/sec
bundle/bundle@rome_ts-sourcemap                              1.00    132.9±1.34ms        ? ?/sec    1.02    134.9±1.51ms        ? ?/sec
bundle/bundle@threejs                                        1.00     39.3±0.86ms        ? ?/sec    1.04     40.8±0.84ms        ? ?/sec
bundle/bundle@threejs-sourcemap                              1.00     49.8±1.59ms        ? ?/sec    1.01     50.5±0.66ms        ? ?/sec
bundle/bundle@threejs10x                                     1.00    429.5±5.15ms        ? ?/sec    1.01    433.1±4.13ms        ? ?/sec
bundle/bundle@threejs10x-sourcemap                           1.00    513.3±2.47ms        ? ?/sec    1.01    519.8±5.67ms        ? ?/sec
scan/scan@rome_ts                                            1.03     88.3±4.11ms        ? ?/sec    1.00     85.8±1.21ms        ? ?/sec
scan/scan@threejs                                            1.03     30.2±1.93ms        ? ?/sec    1.00     29.4±0.36ms        ? ?/sec
scan/scan@threejs10x                                         1.00    314.8±3.40ms        ? ?/sec    1.00    314.9±3.29ms        ? ?/sec

@hyf0 hyf0 added this pull request to the merge queue Aug 1, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Aug 1, 2025
@sapphi-red sapphi-red added this pull request to the merge queue Aug 1, 2025
Merged via the queue into main with commit 758ded0 Aug 1, 2025
23 checks passed
@sapphi-red sapphi-red deleted the 08-01-fix_hmr_module_namespace_object_should_be_included_via_treeshaking_mechanism_normally branch August 1, 2025 03:20
This was referenced Aug 4, 2025
shulaoda added a commit that referenced this pull request Aug 4, 2025
## [1.0.0-beta.31] - 2025-08-04

### 🚀 Features

- support function for asset_inline_limit (#5453) by @AliceLanniste
- hmr: generate initializer for `export * from ...` (#5577) by @hyf0
- hmr: remove meaningless stmt instead of replacing with empty stmt (#5570) by @hyf0
- option `watch.clearScreen` (#5518) by @situ2001
- rolldown: oxc v0.80.0 (#5538) by @Boshen
- plugin/generateBundle: add support for modifying chunk filename (#5564) by @shulaoda
- assetFileNames: support `name` and `originalFileName` (#5555) by @shulaoda
- add optional `onInvalidate` schema to validator (#5528) by @situ2001
- don't throw resolve errors for dynamic import inside try block (#5537) by @shulaoda
- rolldown: oxc v0.79.0 (#5512) by @Boshen
- rolldown_plugin_asset: align `render_chunk` logic (#5511) by @shulaoda
- rolldown_plugin_utls: finish `render_asset_url_in_js` (#5508) by @shulaoda
- rolldown_plugin_utils: align replacement logic for `__VITE_ASSET__` (#5507) by @shulaoda
- rolldown_plugin_utils: add partial `render_asset_url_in_js` support (#5504) by @shulaoda
- expose `sourcemapBaseUrl` from NormalizedOutputOptions (#5513) by @sapphi-red

### 🐛 Bug Fixes

- modify output filename correctly in `generateBundle` and `writeBundle` (#5580) by @shulaoda
- hmr: ensure correct runtime behavior for `export * from ...` (#5578) by @hyf0
- hmr: repeated imports should point to the same binding (#5571) by @hyf0
- hmr: handle `export * from ...` (#5566) by @hyf0
- rolldown_plugin_web_worker_post: handle `import.meta` correctly (#5565) by @shulaoda
- antd bundle output not correct (#5549) by @IWANABETHATGUY
- hmr: module namespace object should be included via treeshaking mechanism normally (#5543) by @hyf0
- plugin/vite-resolve: use `import` / `require` conditions for external modules resolution (#5540) by @sapphi-red
- rolldown_plugin_asset: InvalidAsset#is should match InvalidAsset::True (#5529) by @AliceLanniste
- __name lacks require('./chunk-containing-runtime') when format: 'cjs' + keepNames: true (#5526) by @IWANABETHATGUY
- plugin/vite-resolve: resolve externalized packages with `resolve.externalConditions` (#5491) by @sapphi-red
- optimization.inlineConst: true does not keep export names when output.minifyInternalExports: true is enabled (#5520) by @IWANABETHATGUY
- scanner: identify `module.exports.__esModule = true` (#5503) by @overlookmotel
- error instead of panic if `sourcemapBaseUrl` is an invalid URL (#5514) by @sapphi-red

### 🚜 Refactor

- hmr: use `__rolldown_exports__` as the name for esm module namespace object (#5579) by @hyf0
- tests: rename `_configName` to `_testName` in configuration files and update variant formatting in snapshots (#5569) by @hyf0
- rolldown: remove unnecessary comments (#5552) by @situ2001
- rolldown: Remove `rolldown_rstr` crate and use `CompactStr` directly (#5542) by @Copilot
- hide namespace statement index knowledge inside StmtInfos (#5545) by @sapphi-red
- use pascal case when naming bitflags field for `ImportRecordMeta` (#5539) by @IWANABETHATGUY
- use concat_string! to simplify string concatenation (#5527) by @IWANABETHATGUY
- use combinator function handle `sourcemap_base_url` parsing (#5517) by @IWANABETHATGUY
- rolldown_plugin_utils: improve `to_output_file_path_in_js` (#5505) by @shulaoda

### 📚 Documentation

- wording nit (#5521) by @nullxone

### 🧪 Testing

- rust: rename `configName` to `_configName` and add comments (#5568) by @hyf0
- rust: re-organize `rolldown_testing_config` (#5567) by @hyf0

### ⚙️ Miscellaneous Tasks

- deps: lock file maintenance npm packages (#5582) by @renovate[bot]
- deps: lock file maintenance (#5581) by @renovate[bot]
- deps: lock file maintenance rust crates (#5576) by @renovate[bot]
- deps: lock file maintenance npm packages (#5574) by @renovate[bot]
- deps: update github-actions (#5573) by @renovate[bot]
- deps: update dependency rolldown-plugin-dts to v0.15.1 (#5572) by @renovate[bot]
- deps: update dependency tsdown to v0.13.2 (#5562) by @renovate[bot]
- deps: update dependency rolldown-plugin-dts to ^0.15.0 (#5563) by @renovate[bot]
- ai: Add AGENTS.md and GitHub Copilot setup workflow (#5556) by @Copilot
- deps: update dependency tsdown to v0.13.1 (#5551) by @renovate[bot]
- deps: update dependency rolldown-plugin-dts to v0.14.3 (#5544) by @renovate[bot]
- ensure all diagnostics in self.errors have Severity::Error (#5494) by @sapphi-red
- vscode: remove `code-spell-checker` extension (#5530) by @shulaoda
- deps: update dependency rolldown-plugin-dts to v0.14.2 (#5522) by @renovate[bot]
- add link to the REPL in the reproduction field description (#5519) by @sapphi-red
- enable some rollup tests (#5515) by @sapphi-red

### ❤️ New Contributors

* @Copilot made their first contribution in [#5556](#5556)
* @nullxone made their first contribution in [#5521](#5521)

Co-authored-by: shulaoda <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: HMR panics when importing same file via barrel export and directly (from two separate dynamic imports)

2 participants