Visual studio code VSCode intellisense已停止使用js模块导入
当使用javascript(es2015)导入时,Intellisense拒绝工作 例如:Visual studio code VSCode intellisense已停止使用js模块导入,visual-studio-code,Visual Studio Code,当使用javascript(es2015)导入时,Intellisense拒绝工作 例如:从'react router dom'导入{} 在import语句的大括号内点击[CTRL]+[SPACE],没有任何建议的迹象,列出了模块的导出实体 当我尝试导入使用导出默认值导出的内容时,也没有任何建议 myjsconfig.json { "compilerOptions": { "target": "es6", "allowSyntheticDefaultImports": tru
从'react router dom'导入{}
在import
语句的大括号内点击[CTRL]+[SPACE],没有任何建议的迹象,列出了模块的导出实体
当我尝试导入使用导出默认值导出的内容时,也没有任何建议
myjsconfig.json
{
"compilerOptions": {
"target": "es6",
"allowSyntheticDefaultImports": true
},
"exclude": [
"node_modules",
"**/node_modules/*"
],
"include": [
"src/**/*"
]
}
我正在使用“allowSyntheticDefaultImports”:true
,以便在没有默认值的情况下处理导出。
我过度使用排除部分,我知道)
VSCODE关于
Version: 1.31.1
Commit: 1b8e8302e405050205e69b59abb3559592bb9e60
Date: 2019-02-12T02:19:29.629Z
Electron: 3.1.2
Chrome: 66.0.3359.181
Node.js: 10.2.0
V8: 6.6.346.32
OS: Linux x64 4.15.0-45-generic
除此之外,一切和intellisense都能正常工作有两个选项对我很有用:
对象的“构建操作”设置为“无”。将其更改为Compile(使用.cs-tho)
关闭VS,删除资源管理器中解决方案旁边隐藏的“.VS”文件夹。重新打开VS