Answer the question
In order to leave comments, you need to log in
How to enable import to file, not to Index?
There are three files
1.ts - export const testA = 1;
index.ts - export * from './1'
2.ts - import * from '.'
When I save 2.ts vscode adds the import before index.
We need it to add import * from '.' transform to import * from './2'
my settings.js
{
"git.ignoreWindowsGit27Warning": true,
"git.autofetch": true,
"angular.experimental-ivy": true,
"files.autoSave": "afterDelay" ,
"git.enableSmartCommit": true,
"explorer.confirmDragAndDrop": false,
"typescript.updateImportsOnFileMove.enabled": "always",
"explorer.
"workbench.startupEditor": "none",
"javascript.preferences.quoteStyle": "single",
"typescript.preferences.includePackageJsonAutoImports": "on",
"eslint.enable": true,
"eslint.format.enable": true,
"javascript.suggest.autoImports": true,
"editor.codeActionsOnSave": {
"source.addMissingImports": true,
"source.fixAll.eslint": true,
"source.organizeImports": true
},
"typescript.preferences .importModuleSpecifier": "relative"
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question