【发布时间】:2020-04-26 11:09:14
【问题描述】:
每当我打开工作区时,我都会在 VSCode 中收到以下错误。
To enable project-wide JavaScript/TypeScript language features, exclude large folders with source files that you do not work on.
Source: TypeScript and Javascript Language Feat... [BUTTON: CONFIGURE EXCLUDES]
我单击消息上的Configure Excludes 按钮,它会打开以下文件
FRONTENDAPP/jsconfig.json
{"compilerOptions":{"target":"es6","experimentalDecorators":true},"exclude":["node_modules","bower_components","tmp","vendor",".git","dist"]}
在我看来,根据以下文档正确配置。 :https://code.visualstudio.com/docs/languages/javascript
那为什么总是报错呢?
我的工作区设置如下:
FOLDER: NOTES
FOLDER: FRONTENDAPP
FOLDER: BACKENDAPP
每个文件夹作为一个jsconfig.json 文件。
NOTES 和 BACKENDAPP 中的相应文件相同,如下所示:
{"compilerOptions":{"target":"es6","experimentalDecorators":true},"exclude":["node_modules","bower_components","tmp","vendor",".git","dist"]}
【问题讨论】:
-
听起来您的每个应用文件夹中仍有大文件夹。
-
你的工作区有多少个 JS/TS 文件?
-
检查文件计数给了我正确的策略。 @MattBierner。我找到了一个文件夹,里面有不少js文件,现在已经排除了。
标签: javascript typescript visual-studio-code vscode-settings