Skip to content
This repository has been archived by the owner on Oct 9, 2020. It is now read-only.

TypeScript implement custom resolver #262

Closed
guybedford opened this issue Aug 3, 2015 · 5 comments
Closed

TypeScript implement custom resolver #262

guybedford opened this issue Aug 3, 2015 · 5 comments

Comments

@guybedford
Copy link
Member

To ensure that bundle dependencies are normalized correctly, it is necessary to have a custom resolver to pass into TypeScript.

@vladima you mentioned previously this was the plan for custom resolutions? Please keep me posted on how that goes.

@vladima
Copy link
Contributor

vladima commented Aug 3, 2015

@guybedford sure. Currently we plan to expose custom resolution via CompilerHost.resolveModuleName so host can implement any resolution policy it needs. Can you please tell if it will cover your scenarios?

@guybedford
Copy link
Member Author

@vladima thanks yes that looks exactly right. In SystemJS we can always relate every module to an absolute URL or filepath, but it may be worth considering relaxing this constraint and allowing virtual naming as well. For example, we use the @empty module in SystemJS as an output for this for nulled out modules (an edge case certainly, but to illustrate).

@vladima
Copy link
Contributor

vladima commented Aug 14, 2015

@guybedford this PR on the TypeScript side should allow to pass map (originalName -> newName, effectively load.depMap) to transpiler. Can you please check if it will cover your scenarios?

@guybedford
Copy link
Member Author

It works excellently, thanks @vladima for your work on this.

@guybedford
Copy link
Member Author

Released in 0.13.2.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants