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

Update Imports On File Move: does not persist file extension #24493

Closed
mjbvz opened this issue May 30, 2018 · 2 comments
Closed

Update Imports On File Move: does not persist file extension #24493

mjbvz opened this issue May 30, 2018 · 2 comments
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue VS Code Tracked There is a VS Code equivalent to this issue

Comments

@mjbvz
Copy link
Contributor

mjbvz commented May 30, 2018

From @misolori on May 30, 2018 15:22

Issue Type: Bug

microsoft/vscode#50488

Example
ezgif com-gif-maker 9

Resulting error
image

When moving a js file while using the "Update Imports On File Move" setting and the import has the file extension explicitly set, the auto update will strip out the ".js" extension. This causes issues with the js file referencing it as it needs the extension name.

VS Code version: Code - Insiders 1.24.0-insider (bfd155e, 2018-05-29T06:13:09.810Z)
OS version: Darwin x64 17.5.0

Copied from original issue: microsoft/vscode#50804

@mjbvz mjbvz self-assigned this May 30, 2018
@mjbvz mjbvz added the insiders label May 30, 2018
@mjbvz mjbvz removed the insiders label May 30, 2018
@mjbvz mjbvz removed their assignment May 30, 2018
@mjbvz mjbvz added the VS Code Tracked There is a VS Code equivalent to this issue label May 30, 2018
@mjbvz
Copy link
Contributor Author

mjbvz commented May 30, 2018

I can repo the extension getting removed but not the part where the file is not resolved afterwards or the error in the console.

@misolori Were you just using the defaultjsconfig.json?


Perhaps instead of preserving the extension, there should be another preference about adding file extensions to import paths?

@miguelsolorio
Copy link

@mjbvz yes to using the default jsconfig.json. Regarding the console error, I was using the browser-sync module with node. I also found a similar issue posted on SO that reflects the problem I ran into. This repros in Chrome + Safari, adding the extension to the import eliminates the issue.

@mhegazy mhegazy assigned ghost May 30, 2018
@mhegazy mhegazy added this to the TypeScript 2.9.2 milestone May 30, 2018
@mhegazy mhegazy added the Bug A bug in TypeScript label May 30, 2018
@ghost ghost added the Fixed A PR has been merged for this issue label May 30, 2018
@mhegazy mhegazy closed this as completed Jun 1, 2018
@microsoft microsoft locked and limited conversation to collaborators Jul 31, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue VS Code Tracked There is a VS Code equivalent to this issue
Projects
None yet
Development

No branches or pull requests

3 participants