我正在开发一个库,它将通过npm安装为Angular模块.该库已用打字稿编写.直到Angular 5.0.0,一切都像魅力一样,但是由于5.0用户开始收到以下错误:
ERROR in ./node_modules/mypackage/index.ts Module build Failed:
Error: /node_modules/mypackage/index.ts is not part of
the compilation output. Please check the other error messages for
details.
作为一种解决方法,我可以在tsconfig.json中添加包含该文件的路径.我的问题是我是否应该继续在打字稿中提供一个库,还是应该将它编译成JS并作为编译包发布,为什么?