[英]Change the location of tsconfig.app.json
I can change the location of files tsconfig.app.json and tsconfig.spec.json? 我可以更改文件tsconfig.app.json和tsconfig.spec.json的位置吗? I want to put these files inside src/config
folder. 我想将这些文件放在src/config
文件夹中。 But qhen i try, the Terminal show me an error. 但是,如果我尝试尝试,终端会显示一个错误。
Windows 10
NPM 5.6.0
Node 6.11.4
NG 5.2
tsconfig.app.json
inside config folder 将文件tsconfig.app.json
放入配置文件夹 tsconfig.json
inside extends
into tsconfig.app.json 更改tsconfig.json
的位置,将tsconfig.json
extends
到tsconfig.app.json Return the error: 返回错误:
ERROR in TypeError: Cannot read property 'length' of undefined
at createSourceFile (C:\Users\bruno.dulcetti\Repositorios\tfs\_componentes\Base.Template.Angular\node_modules\typescript\lib\typescript.js:12619:109)
at parseSourceFileWorker (C:\Users\bruno.dulcetti\Repositorios\tfs\_componentes\Base.Template.Angular\node_modules\typescript\lib\typescript.js:12551:26)
at Object.parseSourceFile (C:\Users\bruno.dulcetti\Repositorios\tfs\_componentes\Base.Template.Angular\node_modules\typescript\lib\typescript.js:12477:26)
at Object.createSourceFile (C:\Users\bruno.dulcetti\Repositorios\tfs\_componentes\Base.Template.Angular\node_modules\typescript\lib\typescript.js:12318:29)
at new TypeScriptFileRefactor (C:\Users\bruno.dulcetti\Repositorios\tfs\_componentes\Base.Template.Angular\node_modules\@ngtools\webpack\src\refactor.js:79:35)
at Object.resolveEntryModuleFromMain (C:\Users\bruno.dulcetti\Repositorios\tfs\_componentes\Base.Template.Angular\node_modules\@ngtools\webpack\src\entry_resolver.js:108:20)
at Promise.resolve.then.then (C:\Users\bruno.dulcetti\Repositorios\tfs\_componentes\Base.Template.Angular\node_modules\@ngtools\webpack\src\angular_compiler_plugin.js:255:54)
at process._tickCallback (internal/process/next_tick.js:109:7)
at Module.runMain (module.js:606:11)
at run (bootstrap_node.js:383:7)
at startup (bootstrap_node.js:149:9)
at bootstrap_node.js:496:3
My file tsconfig.app.json
: 我的文件tsconfig.app.json
:
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"outDir": "../../out-tsc/app",
"baseUrl": "../",
"module": "es2015",
"types": []
},
"exclude": [
"test.ts",
"../**/*.spec.ts"
]
}
I don't use the CLI. 我不使用CLI。
Regards. 问候。
我想您可以尝试在项目的根文件夹中的.angular-cli.json中的应用程序定义中将路径/名称更改为tsconfig.app.json
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.