Description
What is the problem this feature will solve?
Tools such as rspack, bun, typescript, remix, and turbo are all looking at using tsconfig.json#compilerOptions.paths . This is in part due to constraints on package.json#imports and it lacking the ability to fully alias the entire import space. These also seem to have differing constraints and some are doing something outside the standard TS behavior on purpose.
What is the feature you are proposing to solve the problem?
The package.json#imports
field seems sufficient from reading some twitter threads involving a few maintainers from remix or rspack except for the prefix #
constraint. I propose getting feedback from these tools on removing the constraint if that would be sufficient for their users’ general needs. If it is sufficient we could encourage people to use a single way of doing this allowing tooling to avoid divergence and interop woes.
This would not cover global aliasing which already can be covered with policy redirects but likely is not desirable/sufficient for some subset of users. My hope is that subset is small enough to avoid the issue blocking this entirely.
What alternatives have you considered?
Supporting tsconfig.json in a limited subset to alleviate the user needs.
cc @nodejs/loaders @nodejs/modules