Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/typescript/8.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
将typescript编译成不同的路径_Typescript - Fatal编程技术网

将typescript编译成不同的路径

将typescript编译成不同的路径,typescript,Typescript,我想对节点本地模块使用TS。如何将基本项目编译为/dist,但本地模块在其(模块)路径上编译。 或者不要尝试这样做?您需要使用两个不同的tsconfig.json文件。您可以进行设置,以便使用单个tsc-b命令构建项目的两个部分 在切线上,如果您有一个包含手动编译的某些模块的node\u modules目录,则如果您尝试使用npm或warn等工具在同一node\u modules目录中安装其他模块,则可能会遇到问题。最好在自定义模块的node\u modules外部创建目录,并使用本地路径或其他

我想对节点本地模块使用TS。如何将基本项目编译为/dist,但本地模块在其(模块)路径上编译。
或者不要尝试这样做?

您需要使用两个不同的
tsconfig.json
文件。您可以进行设置,以便使用单个
tsc-b
命令构建项目的两个部分

在切线上,如果您有一个包含手动编译的某些模块的
node\u modules
目录,则如果您尝试使用
npm
warn
等工具在同一
node\u modules
目录中安装其他模块,则可能会遇到问题。最好在自定义模块的
node\u modules
外部创建目录,并使用本地路径或其他工具的
warn
工作区或类似功能将其注册为
package.json
中的依赖项