【发布时间】:2022-08-06 03:03:58
【问题描述】:
让我先说我已经定义了路径只要在全局 tsconfig 文件中。
这是我的项目解决方案
我的路径tsconfig.base.json
{
\"compileOnSave\": false,
\"compilerOptions\": {
\"baseUrl\": \".\",
\"paths\": {
\"@app/*\": [\"apps/app/src/app/*\"]
},
\"outDir\": \"./dist/out-tsc\",
\"sourceMap\": true,
\"declaration\": false,
\"downlevelIteration\": true,
\"moduleResolution\": \"node\",
\"importHelpers\": true,
\"target\": \"es2017\",
\"module\": \"es2020\",
\"lib\": [\"es2018\", \"dom\"],
\"resolveJsonModule\": true,
\"experimentalDecorators\": true,
\"emitDecoratorMetadata\": true,
\"allowSyntheticDefaultImports\": true,
\"rootDir\": \".\"
}
}
我已经为基本 url 和路径尝试了所有可能的替代方案,但我似乎无法正确使用,有什么我遗漏的吗?
-
您确定
apps/app/tsconfig.app.json扩展了正确的 ts 配置(扩展了tsconfig.base.json)吗?参见示例github.com/nrwl/nx-examples/blob/master/apps/cart/tsconfig.json。如果是这样,你会如何描述它“看起来不对”?
标签: angular typescript nrwl-nx