How to disable automatic import statements in VsCode October 2017

前端 未结 5 734
长发绾君心
长发绾君心 2021-01-01 08:36

The latest version of VS Code installed a few days ago (the October 2017 update) keeps adding all kinds of strange import statements to the top of the .ts code file.

5条回答
  •  南笙
    南笙 (楼主)
    2021-01-01 09:04

    As of August 2018 (1.25), the accepted answer doesn't always work.

    Instead, add this line to your folder-specific setting.

    {  "typescript.preferences.importModuleSpecifier": "relative" }
    

    Don't figure what's going on here, but those automatic path changes never happen in my environment.

提交回复
热议问题