VSCode - source.organizeImports在.vue文件中不起作用

问题描述 投票:0回答:1

我想让我的编辑删除未使用的导入

"editor.formatOnPaste": false,
  "editor.formatOnSave": false,
  "editor.codeActionsOnSave": {
    "source.organizeImports": true,
    "source.fixAll": true
  },

这在我的主入口点(.js文件)上工作正常,但对于任何带有.vue扩展名的东西都不起作用。

有人有这个工作吗?

visual-studio-code vuejs2 vscode-settings
1个回答
1
投票

Vue扩展Vetur目前不支持组织进口(tracked here

组织导入功能必须通过扩展名按语言实现。如果您有兴趣为Vue提供支持,请考虑使用PR帮助Vetur

© www.soinside.com 2019 - 2024. All rights reserved.