Auto-Import icon indicating copy to clipboard operation
Auto-Import copied to clipboard

Doesn't pick up default export when it there is an export of the same name in the same file

Open ghost opened this issue 5 years ago • 0 comments

A library we work with has this common pattern:

SomeComponent.tsx:

export function SomeComponent() {};

export default = wrap(SomeComponent, withSomethingElse);

Now when I type:

<SomeCom

and trigger this plugin I get the popup that has the correct file, but only one entry, and when I import I get:

import { SomeComponent } from 'path/to/Component.tsx';

While I usually want:

import SomeComponent from 'path/to/Component.tsx';

I think both options should be in the drop-down in this case.

ghost avatar May 20 '19 19:05 ghost