Avatar for the swc-project user
swc-project
swc
BlogDocsChangelog

Performance History

Latest Results

feat(es/module): support moduleRoot for AMD module IDs (#11964) Closes #4014 ### Description This PR adds support for the moduleRoot configuration property in the AMD module transformer. When you specify a moduleRoot, SWC will now compute the module ID based on the relative path between that root directory and the file currently being compiled. The goal here is to make SWC perfectly mimic TypeScript's AMD path generation behavior! I've also made sure we handle edge cases correctly: - **Config Resolution:** If moduleRoot is defined in a .swcrc file, we now correctly resolve it relative to the directory where the .swcrc file lives, rather than just blindly using the process cwd. - **Programmatic Options:** Programmatic options are natively respected without incorrectly rebasing them against the file path. - **Symlinks:** The logic respects jsc.preserveSymlinks = true. I added a component-count heuristic so we safely fall back to filesystem canonicalization *only* when absolutely necessary (like when dealing with Windows \?\ verbatim paths). - **Typings:** I've updated the WASM typings to make sure the new moduleRoot bindings are exposed consistently across both the core and minifier declarations. ### BREAKING CHANGE: None. ### Related issue: #4014 --------- Co-authored-by: Donny/강동윤 <kdy.1997.dev@gmail.com>
main
3 minutes ago
fix(es/module): update AMD transform integration
Kaus1ubh:fix-4014-fresh
37 minutes ago
chore: Add changeset
Austaras:iter
41 minutes ago
chore: Add changeset
SyMind:fix-template-unicode-escapes
41 minutes ago
fix(es/minifier): preserve dynamic addition coercion
fix/minifier-constant-join-3
43 minutes ago

Latest Branches

CodSpeed Performance Gauge
0%
feat(es/module): support moduleRoot for AMD module IDs#11964
43 minutes ago
45b9c60
Kaus1ubh:fix-4014-fresh
CodSpeed Performance Gauge
0%
44 minutes ago
8bcff0b
Austaras:iter
CodSpeed Performance Gauge
0%
44 minutes ago
7b6bcf7
SyMind:fix-template-unicode-escapes
© 2026 CodSpeed Technology
Home Terms Privacy Docs