Add customModuleResolution / customModuleResolver to compilerOptions #28624
Labels
Duplicate
An existing issue was already created
In Discussion
Not yet reached consensus
Suggestion
An idea for TypeScript
Search Terms
module file resolution custom
Suggestion
Add customModuleResolution / customModuleResolver to compilerOptions. This option provide path or name to custom module resolver module/file that should provide function that could resolve modules/files in custom way.
Simple implementation / working example:
https://github.com/webcarrot/TypeScript/commit/97781d8cba76fb3e3b4e07c295af918e94ceed80
Use Cases
Anything that is related with files resolution and cannot be handled by setting
compilerOptions.paths
etc.Examples
Postfixs for different run-time environments:
Files:
b.ts file:
Example custom resolver implementation:
Checklist
My suggestion meets these guidelines:
Contraindications
The text was updated successfully, but these errors were encountered: