【发布时间】:2021-01-24 18:30:22
【问题描述】:
我对@987654321@ 配置非常陌生,但我只是想将我的 src 目录编译为应有的编译 javascript,但它只是没有使用编译后的代码创建 outDir 文件夹。
这是我的tsconfig.json:
{
"compilerOptions": {
"module": "commonjs",
"esModuleInterop": true,
"target": "es2017",
"skipLibCheck": true,
"noImplicitAny": true,
"noEmit": true,
"moduleResolution": "node",
"sourceMap": true,
"outDir": "dist",
"baseUrl": ".",
"jsx": "react",
"paths": {
"MyApplicationTypes" : ["@types/MyApplicationTypes/index.d.ts"],
"*": [
"node_modules/*"
]
},
"typeRoots" : ["@types"]
},
"include": [
"server/**/*",
"client/**/*"
],
"exclude" : [
"./client/dist",
"./client/.cache",
"./dist",
"./.cache"
]
}
我的npm run build 命令只是普通的tsc,它运行并完成没有任何错误或任何其他输出。
dist/ 没有创建,即使我手动创建文件夹,它也保持为空。怎么回事?!
我的文件夹结构非常简单,包含服务器和客户端:
- project
- client
- index.html
- index.tsx
... etc
- server
- index.ts
... etc
有什么理由吗?我的 tsconfig 很简单
【问题讨论】:
标签: typescript typescript-typings tsconfig