tsconfig.json
{
"compileOnSave": false,
"compilerOptions": {
"baseUrl": "./",
"outDir": "./dist/out-tsc",
"sourceMap": true,
"declaration": false,
"module": "esnext",
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"importHelpers": true,
"target": "es5",
"typeRoots": [
"node_modules/@types"
],
"lib": [
"es2018",
"dom"
],
"paths": {
"@Models/*": ["src/models/*"],
"@Services/*": ["src/app/services/*"],
"@Pipes/*": ["src/app/pipes/*"],
"@Utlis/*": ["src/app/utlis/*"],
"@Component/*": ["src/app/components/*"]
}
},
"angularCompilerOptions": {
"fullTemplateTypeCheck": true,
"strictInjectionParameters": true
}
}
这里也需要配置
tsconfig.app.json
{
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/app",
"baseUrl": "./",
"module": "es2015",
"types": [],
"paths": {
"@src/*": ["*"]
},
},
"exclude": [
"test.ts",
"**/*.spec.ts"
]
}
angular配置文件夹根目录@ tsconfig.json
于 2022-05-31 01:10:51 首次发布