typescript module resolution

左心房为你撑大大i 提交于 2019-12-04 05:32:46

I think that should be possible, if you look at angular's code they seem to have both, ie. in the http.ts module: https://github.com/angular/angular/blob/master/modules/angular2/src/http/http.ts

Not Trivial.

They have module resolution classic https://github.com/angular/angular/blob/6b73d09ba1d8c227d1b297341de2218aea5d1276/modules/angular2/tsconfig.json#L12

import {Observable} from 'rxjs/Observable'; //this probably comes from node_modules

The have a non trivial build pipeline specific to them that maps this to node_modules. See : https://github.com/angular/angular/blob/851647334040ec95d1ab2f376f6b6bb76ead0d9a/tools/broccoli/broccoli-typescript.ts#L271

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!