Skip to content

absolute paths are not found #10

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

Closed
scottwio opened this issue Jul 19, 2017 · 2 comments
Closed

absolute paths are not found #10

scottwio opened this issue Jul 19, 2017 · 2 comments

Comments

@scottwio
Copy link

Typescript allows you to us absolute paths to references imports. These however do not get detected by this plugin. Is there any way you could find and change these paths.

import { PromotionEffect } from 'app/shared/store-effects/promotions.effect';

Thanks for the plugin, so helpful

@stringham
Copy link
Owner

stringham commented Jul 20, 2017

Yes, if the module resolution is set to "classic" then typescript will look for other ways to resolve paths other than the relative path.

However, it's more complicated than just being "absolute" from the root of the project. See https://www.typescriptlang.org/docs/handbook/module-resolution.html#classic for the description.

Currently, this extension resolves and updates relative paths with a combination of regular expressions. In order to update imports for their "classic" module resolution it would either require a lot of work, or potentially may need an API from the TypeScript team to be implemented: microsoft/TypeScript#6487 .

@stringham
Copy link
Owner

Added a user setting in version 1.9.0. Set movets.relativeToTsconfig to true to enable.

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