自动导入 Visual Studio 代码在 jsx 中不起作用 [英] Auto Import Visual Studio Code not working in jsx
问题描述
知道如何在 jsx
中启用自动导入建议吗?
Any idea how to enable auto import suggestion inside jsx
?
这很奇怪,因为如果我在 jsx
之外输入,它会给我自动导入建议.
This is weird because if I'm typing outside of the jsx
, it gives me the auto import suggestion.
我没有安装任何片段或 Auto Import
扩展或 Visual Studio IntelliCode
.
I'm not installing any snippets or Auto Import
Extension, or Visual Studio IntelliCode
.
但即使我安装了它们,也无济于事.
But even though I installed them, it doesn't help this issue.
推荐答案
这个问题:Auto-从 jsx 内部导入不起作用 显然会在 vscode v1.58 中修复.
This issue: Auto-imports from within jsx don't work will apparently be fixed in vscode v1.58.
https://github.com/microsoft/vscode-docs/blob/vnext/release-notes/v1_58.md#typescript-435
打字稿 4.3.5
我们现在捆绑了 TS 4.3.5.这个小更新修复了一些重要的错误,包括在 JSX 中不起作用的自动导入.
We now bundle TS 4.3.5. This minor update fixes a few important bugs, including auto imports not working in JSX.
这篇关于自动导入 Visual Studio 代码在 jsx 中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!