Skip to content

feat: Implement HashedModuleIdsPlugin#13197

Merged
hardfist merged 12 commits intoweb-infra-dev:mainfrom
aancuta:aa/hashed-module-ids-plugin
Mar 31, 2026
Merged

feat: Implement HashedModuleIdsPlugin#13197
hardfist merged 12 commits intoweb-infra-dev:mainfrom
aancuta:aa/hashed-module-ids-plugin

Conversation

@aancuta
Copy link
Copy Markdown
Contributor

@aancuta aancuta commented Mar 4, 2026

Summary

Implementing https://webpack.js.org/plugins/hashed-module-ids-plugin/ which is currently unsupported.

Related links

https://webpack.js.org/plugins/hashed-module-ids-plugin/

Checklist

  • Tests updated.
  • Documentation updated.

@aancuta aancuta requested a review from hardfist as a code owner March 4, 2026 09:23
@aancuta aancuta changed the title Implement HashedModuleIdsPlugin feat: Implement HashedModuleIdsPlugin Mar 4, 2026
@github-actions github-actions Bot added the release: feature release: feature related release(mr only) label Mar 4, 2026
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Mar 7, 2026

Merging this PR will not alter performance

🎉 Hooray! codspeed-node just leveled up to 5.2.0!

A heads-up, this is a breaking change and it might affect your current performance baseline a bit. But here's the exciting part - it's packed with new, cool features and promises improved result stability 🥳!
Curious about what's new? Visit our releases page to delve into all the awesome details about this new version.

✅ 9 untouched benchmarks
⏩ 26 skipped benchmarks1


Comparing aancuta:aa/hashed-module-ids-plugin (8dccc6a) with main (24f3816)

Open in CodSpeed

Footnotes

  1. 26 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

Comment thread tests/rspack-test/configCases/optimization/hashed-module-ids/rspack.config.js Outdated
@aancuta
Copy link
Copy Markdown
Contributor Author

aancuta commented Mar 30, 2026

@JSerFeng @LingyuCoder could I get some help moving forward with this contribution, please? 🙏

@aancuta
Copy link
Copy Markdown
Contributor Author

aancuta commented Mar 31, 2026

CI failure seems unrelated to my changes at first sight?

tests/rspack-test test:  ✗ [base] Config.part1.test.js (499)
tests/rspack-test test:   ✓ config > configCases-configCases/dependencies/file-dependencies-huge > should pass (5.65s)
tests/rspack-test test: [Function: NO_INLINE]
tests/rspack-test test: worker (tid = 43) sent an error! memory access out of bounds
tests/rspack-test test: Error [RuntimeError]: memory access out of bounds
tests/rspack-test test:     at rspack_node.wasm.<core[b3d91c9d97ad73d4]::iter::adapters::map::Map<bitflags[cf3fe93eb466b8a4]::iter::IterNames<rspack_core[55f342a9f0a5f685]::runtime_globals::RuntimeGlobals>, <rspack_core[55f342a9f0a5f685]::runtime_template::RuntimeTemplate>::new::{closure#0}> as core[b3d91c9d97ad73d4]::iter::traits::iterator::Iterator>::fold::<(), core[b3d91c9d97ad73d4]::iter::traits::iterator::Iterator::for_each::call<(alloc[a383e2a28d965ba]::string::String, serde_json[17dbcc28ce79297c]::value::Value), <indexmap[a9c8275a2311a252]::map::IndexMap<alloc[a383e2a28d965ba]::string::String, serde_json[17dbcc28ce79297c]::value::Value> as core[b3d91c9d97ad73d4]::iter::traits::collect::Extend<(alloc[a383e2a28d965ba]::string::String, serde_json[17dbcc28ce79297c]::value::Value)>>::extend<core[b3d91c9d97ad73d4]::iter::adapters::map::Map<bitflags[cf3fe93eb466b8a4]::iter::IterNames<rspack_core[55f342a9f0a5f685]::runtime_globals::RuntimeGlobals>, <rspack_core[55f342a9f0a5f685]::runtime_template::RuntimeTemplate>::new::{closure#0}>>::{closure#0}>::{closure#0}> (wasm://wasm/rspack_node.wasm-7916133a:wasm-function[16004]:0x18d895c)
tests/rspack-test test:     at rspack_node.wasm.<rspack_core[55f342a9f0a5f685]::runtime_template::RuntimeTemplate>::new (wasm://wasm/rspack_node.wasm-7916133a:wasm-function[4801]:0xf59ea7)
tests/rspack-test test:     at rspack_node.wasm.<rspack_core[55f342a9f0a5f685]::compilation::Compilation>::new (wasm://wasm/rspack_node.wasm-7916133a:wasm-function[1433]:0x90c5d9)
tests/rspack-test test:     at rspack_node.wasm.<tokio[6e5913acf97ab48e]::task::task_local::LocalKey<alloc[a383e2a28d965ba]::sync::Arc<rspack_tasks[ca7379a75bd225aa]::CompilerContext>>>::scope_inner::<<tokio[6e5913acf97ab48e]::task::task_local::TaskLocalFuture<alloc[a383e2a28d965ba]::sync::Arc<rspack_tasks[ca7379a75bd225aa]::CompilerContext>, <rspack_core[55f342a9f0a5f685]::compiler::Compiler>::build_inner::{closure#0}> as core[b3d91c9d97ad73d4]::future::future::Future>::poll::{closure#0}, core[b3d91c9d97ad73d4]::option::Option<core[b3d91c9d97ad73d4]::task::poll::Poll<core[b3d91c9d97ad73d4]::result::Result<(), rspack_error[3188b8fab713bc26]::error::Error>>>> (wasm://wasm/rspack_node.wasm-7916133a:wasm-function[2968]:0xc7cd7f)
tests/rspack-test test:     at rspack_node.wasm.<tracing[c52c48ef40356365]::instrument::Instrumented<rspack_binding_api[cbc6a7138e8b936d]::utils::callbackify<(), <rspack_binding_api[cbc6a7138e8b936d]::JsCompiler>::build::{closure#0}::{closure#0}, <rspack_binding_api[cbc6a7138e8b936d]::JsCompiler>::build::{closure#0}::{closure#1}>::{closure#3}> as core[b3d91c9d97ad73d4]::future::future::Future>::poll (wasm://wasm/rspack_node.wasm-7916133a:wasm-function[5676]:0x107ca8d)
tests/rspack-test test:     at rspack_node.wasm.<tokio[6e5913acf97ab48e]::runtime::task::core::Core<tracing[c52c48ef40356365]::instrument::Instrumented<rspack_binding_api[cbc6a7138e8b936d]::utils::callbackify<(), <rspack_binding_api[cbc6a7138e8b936d]::JsCompiler>::build::{closure#0}::{closure#0}, <rspack_binding_api[cbc6a7138e8b936d]::JsCompiler>::build::{closure#0}::{closure#1}>::{closure#3}>, alloc[a383e2a28d965ba]::sync::Arc<tokio[6e5913acf97ab48e]::runtime::scheduler::current_thread::Handle>>>::poll (wasm://wasm/rspack_node.wasm-7916133a:wasm-function[47825]:0x22b2003)
tests/rspack-test test:     at rspack_node.wasm.<tokio[6e5913acf97ab48e]::runtime::task::harness::Harness<tracing[c52c48ef40356365]::instrument::Instrumented<rspack_binding_api[cbc6a7138e8b936d]::utils::callbackify<(), <rspack_binding_api[cbc6a7138e8b936d]::JsCompiler>::build::{closure#0}::{closure#0}, <rspack_binding_api[cbc6a7138e8b936d]::JsCompiler>::build::{closure#0}::{closure#1}>::{closure#3}>, alloc[a383e2a28d965ba]::sync::Arc<tokio[6e5913acf97ab48e]::runtime::scheduler::multi_thread::handle::Handle>>>::poll_inner (wasm://wasm/rspack_node.wasm-7916133a:wasm-function[25747]:0x1d44cec)
tests/rspack-test test:     at rspack_node.wasm.<tokio[6e5913acf97ab48e]::runtime::task::harness::Harness<tracing[c52c48ef40356365]::instrument::Instrumented<rspack_binding_api[cbc6a7138e8b936d]::utils::callbackify<(), <rspack_binding_api[cbc6a7138e8b936d]::JsCompiler>::build::{closure#0}::{closure#0}, <rspack_binding_api[cbc6a7138e8b936d]::JsCompiler>::build::{closure#0}::{closure#1}>::{closure#3}>, alloc[a383e2a28d965ba]::sync::Arc<tokio[6e5913acf97ab48e]::runtime::scheduler::multi_thread::handle::Handle>>>::poll (wasm://wasm/rspack_node.wasm-7916133a:wasm-function[43883]:0x2208d6b)
tests/rspack-test test:     at rspack_node.wasm.tokio[6e5913acf97ab48e]::runtime::task::raw::poll::<tracing[c52c48ef40356365]::instrument::Instrumented<rspack_binding_api[cbc6a7138e8b936d]::utils::callbackify<(), <rspack_binding_api[cbc6a7138e8b936d]::JsCompiler>::build::{closure#0}::{closure#0}, <rspack_binding_api[cbc6a7138e8b936d]::JsCompiler>::build::{closure#0}::{closure#1}>::{closure#3}>, alloc[a383e2a28d965ba]::sync::Arc<tokio[6e5913acf97ab48e]::runtime::scheduler::multi_thread::handle::Handle>> (wasm://wasm/rspack_node.wasm-7916133a:wasm-function[89200]:0x251ea7d)
tests/rspack-test test:     at rspack_node.wasm.<tokio[6e5913acf97ab48e]::runtime::scheduler::multi_thread::worker::Context>::run_task (wasm://wasm/rspack_node.wasm-7916133a:wasm-function[7242]:0x123bf05)

@hardfist
Copy link
Copy Markdown
Contributor

CI failure seems unrelated to my changes at first sight?

tests/rspack-test test:  ✗ [base] Config.part1.test.js (499)
tests/rspack-test test:   ✓ config > configCases-configCases/dependencies/file-dependencies-huge > should pass (5.65s)
tests/rspack-test test: [Function: NO_INLINE]
tests/rspack-test test: worker (tid = 43) sent an error! memory access out of bounds
tests/rspack-test test: Error [RuntimeError]: memory access out of bounds
tests/rspack-test test:     at rspack_node.wasm.<core[b3d91c9d97ad73d4]::iter::adapters::map::Map<bitflags[cf3fe93eb466b8a4]::iter::IterNames<rspack_core[55f342a9f0a5f685]::runtime_globals::RuntimeGlobals>, <rspack_core[55f342a9f0a5f685]::runtime_template::RuntimeTemplate>::new::{closure#0}> as core[b3d91c9d97ad73d4]::iter::traits::iterator::Iterator>::fold::<(), core[b3d91c9d97ad73d4]::iter::traits::iterator::Iterator::for_each::call<(alloc[a383e2a28d965ba]::string::String, serde_json[17dbcc28ce79297c]::value::Value), <indexmap[a9c8275a2311a252]::map::IndexMap<alloc[a383e2a28d965ba]::string::String, serde_json[17dbcc28ce79297c]::value::Value> as core[b3d91c9d97ad73d4]::iter::traits::collect::Extend<(alloc[a383e2a28d965ba]::string::String, serde_json[17dbcc28ce79297c]::value::Value)>>::extend<core[b3d91c9d97ad73d4]::iter::adapters::map::Map<bitflags[cf3fe93eb466b8a4]::iter::IterNames<rspack_core[55f342a9f0a5f685]::runtime_globals::RuntimeGlobals>, <rspack_core[55f342a9f0a5f685]::runtime_template::RuntimeTemplate>::new::{closure#0}>>::{closure#0}>::{closure#0}> (wasm://wasm/rspack_node.wasm-7916133a:wasm-function[16004]:0x18d895c)
tests/rspack-test test:     at rspack_node.wasm.<rspack_core[55f342a9f0a5f685]::runtime_template::RuntimeTemplate>::new (wasm://wasm/rspack_node.wasm-7916133a:wasm-function[4801]:0xf59ea7)
tests/rspack-test test:     at rspack_node.wasm.<rspack_core[55f342a9f0a5f685]::compilation::Compilation>::new (wasm://wasm/rspack_node.wasm-7916133a:wasm-function[1433]:0x90c5d9)
tests/rspack-test test:     at rspack_node.wasm.<tokio[6e5913acf97ab48e]::task::task_local::LocalKey<alloc[a383e2a28d965ba]::sync::Arc<rspack_tasks[ca7379a75bd225aa]::CompilerContext>>>::scope_inner::<<tokio[6e5913acf97ab48e]::task::task_local::TaskLocalFuture<alloc[a383e2a28d965ba]::sync::Arc<rspack_tasks[ca7379a75bd225aa]::CompilerContext>, <rspack_core[55f342a9f0a5f685]::compiler::Compiler>::build_inner::{closure#0}> as core[b3d91c9d97ad73d4]::future::future::Future>::poll::{closure#0}, core[b3d91c9d97ad73d4]::option::Option<core[b3d91c9d97ad73d4]::task::poll::Poll<core[b3d91c9d97ad73d4]::result::Result<(), rspack_error[3188b8fab713bc26]::error::Error>>>> (wasm://wasm/rspack_node.wasm-7916133a:wasm-function[2968]:0xc7cd7f)
tests/rspack-test test:     at rspack_node.wasm.<tracing[c52c48ef40356365]::instrument::Instrumented<rspack_binding_api[cbc6a7138e8b936d]::utils::callbackify<(), <rspack_binding_api[cbc6a7138e8b936d]::JsCompiler>::build::{closure#0}::{closure#0}, <rspack_binding_api[cbc6a7138e8b936d]::JsCompiler>::build::{closure#0}::{closure#1}>::{closure#3}> as core[b3d91c9d97ad73d4]::future::future::Future>::poll (wasm://wasm/rspack_node.wasm-7916133a:wasm-function[5676]:0x107ca8d)
tests/rspack-test test:     at rspack_node.wasm.<tokio[6e5913acf97ab48e]::runtime::task::core::Core<tracing[c52c48ef40356365]::instrument::Instrumented<rspack_binding_api[cbc6a7138e8b936d]::utils::callbackify<(), <rspack_binding_api[cbc6a7138e8b936d]::JsCompiler>::build::{closure#0}::{closure#0}, <rspack_binding_api[cbc6a7138e8b936d]::JsCompiler>::build::{closure#0}::{closure#1}>::{closure#3}>, alloc[a383e2a28d965ba]::sync::Arc<tokio[6e5913acf97ab48e]::runtime::scheduler::current_thread::Handle>>>::poll (wasm://wasm/rspack_node.wasm-7916133a:wasm-function[47825]:0x22b2003)
tests/rspack-test test:     at rspack_node.wasm.<tokio[6e5913acf97ab48e]::runtime::task::harness::Harness<tracing[c52c48ef40356365]::instrument::Instrumented<rspack_binding_api[cbc6a7138e8b936d]::utils::callbackify<(), <rspack_binding_api[cbc6a7138e8b936d]::JsCompiler>::build::{closure#0}::{closure#0}, <rspack_binding_api[cbc6a7138e8b936d]::JsCompiler>::build::{closure#0}::{closure#1}>::{closure#3}>, alloc[a383e2a28d965ba]::sync::Arc<tokio[6e5913acf97ab48e]::runtime::scheduler::multi_thread::handle::Handle>>>::poll_inner (wasm://wasm/rspack_node.wasm-7916133a:wasm-function[25747]:0x1d44cec)
tests/rspack-test test:     at rspack_node.wasm.<tokio[6e5913acf97ab48e]::runtime::task::harness::Harness<tracing[c52c48ef40356365]::instrument::Instrumented<rspack_binding_api[cbc6a7138e8b936d]::utils::callbackify<(), <rspack_binding_api[cbc6a7138e8b936d]::JsCompiler>::build::{closure#0}::{closure#0}, <rspack_binding_api[cbc6a7138e8b936d]::JsCompiler>::build::{closure#0}::{closure#1}>::{closure#3}>, alloc[a383e2a28d965ba]::sync::Arc<tokio[6e5913acf97ab48e]::runtime::scheduler::multi_thread::handle::Handle>>>::poll (wasm://wasm/rspack_node.wasm-7916133a:wasm-function[43883]:0x2208d6b)
tests/rspack-test test:     at rspack_node.wasm.tokio[6e5913acf97ab48e]::runtime::task::raw::poll::<tracing[c52c48ef40356365]::instrument::Instrumented<rspack_binding_api[cbc6a7138e8b936d]::utils::callbackify<(), <rspack_binding_api[cbc6a7138e8b936d]::JsCompiler>::build::{closure#0}::{closure#0}, <rspack_binding_api[cbc6a7138e8b936d]::JsCompiler>::build::{closure#0}::{closure#1}>::{closure#3}>, alloc[a383e2a28d965ba]::sync::Arc<tokio[6e5913acf97ab48e]::runtime::scheduler::multi_thread::handle::Handle>> (wasm://wasm/rspack_node.wasm-7916133a:wasm-function[89200]:0x251ea7d)
tests/rspack-test test:     at rspack_node.wasm.<tokio[6e5913acf97ab48e]::runtime::scheduler::multi_thread::worker::Context>::run_task (wasm://wasm/rspack_node.wasm-7916133a:wasm-function[7242]:0x123bf05)

It's a flaky case which we're fixing
Thanks for your contribution and I'm gonna merge it

@hardfist hardfist merged commit 00e5446 into web-infra-dev:main Mar 31, 2026
34 of 36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release: feature release: feature related release(mr only)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants