Auto-Import
Auto-Import copied to clipboard
Duplicate imports
When I have existing imports from ../foo
, any auto completions for exports in this module will add another import from ./../foo
.
E.g.
import { x } from '../foo';
// after auto importing y…
import { y } from './../foo';
Expected:
// after auto importing y…
import { x, y } from '../foo';
This may be related to #37
BTW, over on another project there is a library design discussion underway. One topic that has come up is that if a library exports a symbol from only one place, tooling (like this) has no way to import it from the "wrong" place.
For some npm modules I have more than two options:
-
lib/index.js
-
dist/example.js
-
src/path/to/file.js
-
src/index.js
I think even if there was only a unique export from the index, it would still be picked up from lib
and dist
.