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

Import module based on path relative to project root (tsconfig.json). #2828

Closed
vilicvane opened this issue Apr 18, 2015 · 4 comments
Closed
Labels
Duplicate An existing issue was already created Suggestion An idea for TypeScript

Comments

@vilicvane
Copy link
Contributor

Counting ../../../ is painful, it would be great if TypeScript compiler could convert something like ~/modules/my-module for us based on project root and file path.

@tinganho
Copy link
Contributor

👍

@mhegazy
Copy link
Contributor

mhegazy commented Apr 20, 2015

this should be handled in #2338, by setting a Path mapping for "~/modules/*" : "../../../../Root/*"

@mhegazy mhegazy added Suggestion An idea for TypeScript Duplicate An existing issue was already created labels Apr 20, 2015
@mhegazy mhegazy closed this as completed Apr 20, 2015
@cojack
Copy link

cojack commented Feb 20, 2018

@mhegazy and it's possible? Because this issue #2338 is closed, and I did not find any solution there.

@mhegazy
Copy link
Contributor

mhegazy commented Feb 20, 2018

#2338 gives you a way to tell the compiler where the files are, the compiler is not going to rewrite ~/ for you to be ../.././../. see #15479 for more details.

@microsoft microsoft locked and limited conversation to collaborators Jul 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Duplicate An existing issue was already created Suggestion An idea for TypeScript
Projects
None yet
Development

No branches or pull requests

4 participants