Javascript 重写编译器主机
我有一个非常特殊的用例,我需要一些自定义的编译器行为 基本上,当我在TS文件中有一个导入时,比如Javascript 重写编译器主机,javascript,html,node.js,angular,typescript,Javascript,Html,Node.js,Angular,Typescript,我有一个非常特殊的用例,我需要一些自定义的编译器行为 基本上,当我在TS文件中有一个导入时,比如 import {TableComponent} from '../components/table-component.ts'; 我想更改路径,以便最终使用另一个文件 import {TableComponent} from '../../otherSource/components/table-component.ts'; 我知道我需要做什么,但我不知道如何重写Angular/TS的编译器主机
import {TableComponent} from '../components/table-component.ts';
我想更改路径,以便最终使用另一个文件
import {TableComponent} from '../../otherSource/components/table-component.ts';
我知道我需要做什么,但我不知道如何重写Angular/TS的编译器主机。我需要某种方法来重写方法,编译器在哪里加载文件。您尝试过路径映射吗?是的,但似乎不支持相对路径。