[ts-interface-generator] Support TS ${configDir}
in path mappings for source exports
#484
Labels
ts-interface-generator
Related to the ts-interface-generator sub-package
Describe the bug
Source exports are not or incorrectly resolved when using TS config file template variable
${configDir}
in path mappings.That then results in an error when trying to resolve imports for interfaces.
Expected behavior
I'd expect the same behaviour for the same path mapping targets, no matter if specified relatively or with
${configDir}
.Additional context
ts-interface-generator
expects relative path mapping targets and appliespath.join
in packages/ts-interface-generator/src/addSourceExports.ts#L39.Using
path.resolve
instead seems to fix the issue for me although I do not know${configDir}
in all places / features.Debugged values with current implementation and
${configDir}
:basePath
/my/project/root
allPathMappings[i].target
/my/project/root/src/mylib/
fullTargetPath
/my/project/root/my/project/root/src/mylib/
globalExportName
undefined.MyEnum
The text was updated successfully, but these errors were encountered: