json - 仅在保存时编译 Angular 项目
问题描述
目前,我的 Angular 项目会在保存时以及每当有代码更改时进行编译。我希望它只在保存时编译。
我的 tsconfig.json:
{
"compileOnSave": true,
"compilerOptions": {
"baseUrl": "./",
"outDir": "./dist/out-tsc",
"sourceMap": true,
"declaration": false,
"module": "esnext",
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"importHelpers": true,
"target": "es2015",
"typeRoots": [
"node_modules/@types"
],
"lib": [
"es2018",
"dom"
]
}
}
解决方案
功能的转折autoSave
。
改变:
File > Preferences > Settings > Search autoSave > select off
更改后的用户设置:
"files.autoSave": "off",
推荐阅读
- java - “java.lang.Class.getMethod()”方法中“parameterTypes”的解释和正确格式
- c# - 注册控制器和托管服务时使用 InstancePerLifetimeScope 或 InstancePerDependency?
- excel - 如何使用 VBA 将我的图片放置在现有 powerpoint 幻灯片的幻灯片中心?
- python - Pygame TypeError: join() 参数必须是 str、bytes 或 os.PathLike 对象,而不是“Surface”
- javascript - d3.nest().entries() 中的方程有什么作用?
- python-3.x - Convert date with string component to date time format in python
- php - 如何修复 PHP 错误:“调用未定义函数 posix_strerror()”
- python-3.x - boto3.client 和 pymysql.connect 的区别
- go - GoLand 没有检测到 $GOPATH/pkg/mod 下的供应商包?
- laravel - 如何根据同一行的ID设置列的值?