Uh oh!
There was an error while loading. Please reload this page.
module: allow subpath imports that start with #/ - #60864
Conversation
It's a common ecosystem pattern to map a source root directory to `@/` but it requires special tooling support. This turns `#/*` into a more realistic alternative for that pattern.
Review requested:
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@## main #60864 +/- ##
==========================================
- Coverage 88.54% 88.51% -0.04%
==========================================
Files 703 703 Lines 208262 208393 +131 Branches 40170 40198 +28 ==========================================
+ Hits 184408 184454 +46 - Misses 15861 15928 +67 - Partials 7993 8011 +18
🚀 New features to boost your workflow:
|
Renegade334
commented
Nov 27, 2025
From the perspective of adding support for a new module resolution flavour to TS et al, should this either be semver-major or >=v25.x-only? |
hybrist
commented
Nov 27, 2025
Since this only turns a previous import error into a non-error case, this seems safe to backport pretty aggressively. From the TS perspective, I would expect it to show up in the |
nodejs-github-bot
commented
Dec 1, 2025
nodejs-github-bot
commented
Dec 1, 2025
#/#/hybrist
commented
Dec 1, 2025
CI is clean. Added a change entry to the docs for subpath imports to track version support for this change. |
d3b6ceb to
9f4d8ecCompare
GeoffreyBooth
left a comment
There was a problem hiding this comment.
I think this is fine, but did we dig up the reason for the exclusion in the first place?
hybrist
commented
Dec 2, 2025
Short answer: no. I did try to look around a bit but I couldn't really find one. The behavior was introduced in the original PR (#34117) and @guybedford's reason seemed to be caution but not necessarily explicit risks:
|
nodejs-github-bot
commented
Dec 3, 2025
nodejs-github-bot
commented
Dec 3, 2025
nodejs-github-bot
commented
Dec 3, 2025
getify
commented
Dec 30, 2025
@hybrist just curious, has this yet been backported to v24 branch? |
Renegade334
commented
Dec 30, 2025
It doesn't require backporting, but won't land in v24.x until it's been landed on the active branch for a period first. |
jsumners-nr
commented
Dec 31, 2025
@chrisbbreuer please stop. |
@nodejs/moderation is there something we can do to stop this spamming of references from this @chrisbbreuer. |
Thanks for notifying me. This "chrisbbreuer" will resolve it. On a different note, we are civilized people @ovflowd. Keep your passive aggressive tone to yourself because this clearly wasn't an intention. |
With all due respect, you spammed 200+ comments on this repository. You have no say here and I couldn't care less about your demands. (Don't invade someone's else's home and start demanding things in a passive aggressive tone yourself) On a different note, I'm not a native English speaker, the "this" preceding your handle was my attempt of not assuming your pronouns. |
It's a common ecosystem pattern to map a source root directory to
@/but it requires special tooling support. This turns#/*into a more realistic alternative for that pattern.See: #49182