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

Allow a path mapping to provide a file extension #12103

Merged
5 commits merged into from
Nov 11, 2016
Merged

Conversation

ghost
Copy link

@ghost ghost commented Nov 8, 2016

Fixes #12098

@ghost ghost force-pushed the path_mapping_exact_extension branch from 299e85f to 1c64615 Compare November 8, 2016 15:19
if (resolved) {
return resolved;
// A path mapping may have a ".ts" extension; in contrast to an import, which should omit it.
const tsExtension = tryGetTypeScriptExtensionFromPath(candidate);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think that restricting extensions to only .ts is a right thing here i.e. if user wants to remap some import to .js file. (cc @mhegazy for the opinion)

@ghost ghost merged commit 0e879c0 into master Nov 11, 2016
@ghost ghost deleted the path_mapping_exact_extension branch November 11, 2016 22:22
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants