开发与打字稿中的构建路径

时间:2019-08-13 16:10:01

标签: node.js typescript

这可能很简单,但我一直在搜索,但似乎找不到答案。

我正在使用带有命令的Typescript编写应用程序:
tsc -p tsconfig.build.json

我和path.join在一起。
如何进行这项工作:
发展:path.join(__dirname, '..', '..', 'public')
版本:path.join(__dirname, '..', 'public')

我认为应该在tsconfig中,但是我不确定如何。

这是我的tsconfig.json

{
  "compilerOptions": {
    "module": "commonjs",
    "declaration": true,
    "removeComments": true,
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "target": "es2017",
    "sourceMap": true,
    "outDir": "./app/lib",
    "baseUrl": "./",
    "incremental": true,
  },
  "exclude": ["node_modules", "app"]
}

tsconfig.build.json对其进行了扩展,仅添加了排除项。

0 个答案:

没有答案