Reputation: 7635
Whenever I rename a local file in VSCode, it re-writes the javascript import of external libraries to be typescript imports for a load of files.
I go from
import localFn from './localFile';
import angular from 'angular';
import { fooBar } from 'misc-package';
to
import localfn from './myLovelyLocalFile';
import angular from '../../../../../.cache/typescript/2.9/node_modules/angular';
import { fooBar } from '../../../../../.cache/typescript/2.9/node_modules/misc-package';
And this is across all package that contain angular, misc-package and anything else it thinks it has in typescript.
Is there a way to prevent this?
It looks like this is an issue 1, 2 on the VSCode github repo.
Upvotes: 0
Views: 319
Reputation: 77
Add this to your settings in Vs code :
"javascript.updateImportsOnFileMove.enabled": "never",
Upvotes: 1