-
-
Notifications
You must be signed in to change notification settings - Fork 223
Closed
Labels
FixedFixed in master branch. Pending production release.Fixed in master branch. Pending production release.bugSomething isn't workingSomething isn't working
Description
Describe the bug
If i have a file re-exporting components and then import from that, the import to the original file gets inserted in the script automatically when auto-completing the component name and using the first result.
To Reproduce
Example:
// Barrel file: /utility/index.ts
import Button from './button.svelte';
import TextField from './text-field.svelte';
import Dialog from './dialog.svelte';
...
export {
Button,
TextField,
Dialog,
...
}<!-- Component /components/edit-dialog.svelte -->
<script type="text/typescript">
import { TextField, Button, Dialog } from "../utility";
import Dialog from "../utility/dialog.svelte"; // Gets inserted on auto-completing to Dialog tag in HTML below
</script>
<Dialog>...Expected behavior
The existing named import is recognized and no additional import is added.
Screenshots
There are two Dialog entries, the first one adds the redundant import, the other one is for the existing named import. Ideally the first suggestion would not appear if the named import is already there.
System (please complete the following information):
- OS: Windows 10, 64bit
- IDE: VSCode
- Plugin/Package: Svelte for VSCode
Metadata
Metadata
Assignees
Labels
FixedFixed in master branch. Pending production release.Fixed in master branch. Pending production release.bugSomething isn't workingSomething isn't working
