Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract component command does not remove it's variables and imports #1867

Closed
SlavenDj opened this issue Feb 13, 2023 · 1 comment
Closed

Comments

@SlavenDj
Copy link

Describe the bug

When attempting to create a component, I noticed that while all the necessary elements were successfully copied into the new file, the accompanying variables and imports were not removed in the original file where. As a result, I had to manually remove these unused variables and imports, which added extra time to my workflow. I would appreciate it if this issue could be addressed so that the component creation process is streamlined and more efficient.

Reproduction

  1. Select the HTML code that you want to convert into a component.
  2. Right-click and choose "Svelte: Extract Component" from the menu.
  3. Give a name to the newly created component.
  4. Observe that there are still unused variables and imports in the script tag of the original file.

Expected behaviour

Variables and imports that are moved into new file should me removed from original file.

System Info

  • OS: Linux (Zorin OS)
  • IDE: VSCode 1.75

Which package is the issue about?

Svelte for VS Code extension

Additional Information, eg. Screenshots

No response

@SlavenDj SlavenDj added the bug Something isn't working label Feb 13, 2023
@jasonlyu123 jasonlyu123 removed the bug Something isn't working label Feb 14, 2023
@jasonlyu123
Copy link
Member

Duplicate of #187.

@jasonlyu123 jasonlyu123 closed this as not planned Won't fix, can't repro, duplicate, stale Feb 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants