Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angular/26.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Angular 在角度库中使用Typescript路径映射_Angular_Typescript_Tsconfig - Fatal编程技术网

Angular 在角度库中使用Typescript路径映射

Angular 在角度库中使用Typescript路径映射,angular,typescript,tsconfig,Angular,Typescript,Tsconfig,我目前正在开发一个小的角度库。为了缩短一些导入,我在tsconfig.json中使用了path映射。但是,在构建库之后,在发出的.js文件(在ES2015版本中)中的导入不会更改,因为路径映射仅适用于Typescript transpiler 我的问题是,如何确保导入具有正确的路径,而不必牺牲路径映射功能。我读过一篇文章,但没有找到任何合适的解决办法

我目前正在开发一个小的角度库。为了缩短一些导入,我在
tsconfig.json
中使用了
path
映射。但是,在构建库之后,在发出的
.js
文件(在ES2015版本中)中的导入不会更改,因为路径映射仅适用于Typescript transpiler

我的问题是,如何确保导入具有正确的路径,而不必牺牲
路径
映射功能。我读过一篇文章,但没有找到任何合适的解决办法