Skip to content

Restore support for pathMapping in apps using ngc#10602

Merged
alxhub merged 1 commit into
angular:masterfrom
alexeagle:pathmapping
Aug 9, 2016
Merged

Restore support for pathMapping in apps using ngc#10602
alxhub merged 1 commit into
angular:masterfrom
alexeagle:pathmapping

Conversation

@alexeagle

Copy link
Copy Markdown
Contributor

This resolves the comment I added here: https://github.com/angular/angular/pull/10486/files#r73911617
by reverting the logic in reflector_host.ts and re-implementing using the original approach:
for a list of candidate import statements, ask TypeScript to do moduleResolution on them to see if they resolve to the file we want to import.

Add a new option to angularCompilerOptions called writeImportsForRootDirs which defaults to false. When it's true, we write the ./ style imports so that users can use TS 1.9 pathMapping to make the generated code appear in a unified source tree with the application sources. We do this in google3 for example.

@alexeagle alexeagle added the action: review The PR is still awaiting reviews from at least one requested reviewer label Aug 9, 2016
@mhevery mhevery added pr_state: LGTM and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Aug 9, 2016
@alexeagle alexeagle added the action: merge The PR is ready for merge by the caretaker label Aug 9, 2016
@alxhub alxhub merged commit beadf61 into angular:master Aug 9, 2016
alexeagle added a commit to alexeagle/angular that referenced this pull request Aug 12, 2016
vikerman pushed a commit that referenced this pull request Aug 13, 2016
mhevery added a commit to mhevery/angular that referenced this pull request Aug 13, 2016
alexeagle added a commit that referenced this pull request Aug 16, 2016
alexeagle added a commit that referenced this pull request Aug 17, 2016
alexeagle added a commit that referenced this pull request Aug 18, 2016
@angular-automatic-lock-bot

Copy link
Copy Markdown

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot Bot locked and limited conversation to collaborators Sep 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker cla: yes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants