Skip to content
Advertisement

How i can fix js import auto-hide problem in vs code

Firstly, I imported something from another module in js:

import cloneDeep  from './node_modules/lodash-es/cloneDeep.js'

But when I am not using this cloneDeep in my code and save my script file, then VS Code automatically hides that line.

Before Save

Before Save

After Save

After Save

Advertisement

Answer

vcode settings.json

{
  "editor.codeActionsOnSave": {
    "source.organizeImports": false
  },
}
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement