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

Added support for absolute paths #147

Closed
wants to merge 1 commit into from

Conversation

mprinc
Copy link
Contributor

@mprinc mprinc commented Oct 10, 2020

tsconfig-paths doesn't follow regular paths resolution (#101)
I can provide a minimal repo, but nevertheless, tsc will not append baseUrl to the path mapping that is absolute

This change is "breaking" change for someone that was using absolute mappings, but as the absolute mappings were not working as expected, it is not highly likely that it will really break anyone's code.

Still, there might be a good idea to make it possible to enable the legacy mode (I can extend the PR) or, even keep the legacy mode as default (since I think the current mode is a bug, I suggest against this idea if possible?)

@aleclarson
Copy link
Contributor

Hard to tell what logic you changed with all the whitespace changes. Can you fix those?

@mprinc
Copy link
Contributor Author

mprinc commented Apr 29, 2022

Great to hear back from you, as we still live on a separate clone of the official version :)

How do you suggest I do it? Clone again and re-apply changes or somehow (how?) transform this PR?

@aleclarson
Copy link
Contributor

aleclarson commented Apr 29, 2022

You can try re-commiting with the following commands:

git reset --mixed head^
git diff -U0 -w --no-color | git apply --cached --ignore-whitespace --unidiff-zero -
git commit -m 'feat: support absolute paths in `paths` mapping'

(Ripped from https://stackoverflow.com/questions/3515597/add-only-non-whitespace-changes)

@aleclarson
Copy link
Contributor

@jonaskello This is a duplicate of #184. Close it please :)

@jonaskello jonaskello closed this May 2, 2022
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

Successfully merging this pull request may close these issues.

None yet

3 participants