Skip to content
This repository has been archived by the owner on Feb 22, 2018. It is now read-only.

<fix>(transformers): Fix asset resolution for web assets #1652

Closed
wants to merge 1 commit into from

Conversation

TedSander
Copy link
Contributor

Fixes asset resolution according to Barback rules which are defined here:
http://goo.gl/YDMRc2 specifically library assets are defined with packages
being in the URI and all other resources are considered web resources.

Closes #1651

Fixes asset resolution according to Barback rules which are defined here:
http://goo.gl/YDMRc2 specifically library assets are defined with packages
being in the URI and all other resources are considered web resources.

Closes dart-archive#1651
@rkirov
Copy link
Contributor

rkirov commented Jan 27, 2015

I had another issue for this same problem - #1623, thanks for the fix!

The transformer goes over all @Component templateUrl references (even if they are in 'lib'). Without using absolute or '/package' urls, those references are just as broken as the ones for web. They will either be broken for the transformer or pub serve (depending on whether you include the lib).

Your fix does not work on those and in fact adding web would make it even more confusing. So for now can you add an extra check that resolver.getSourceAssetId(reference).path begins with web before appending web to the url. We can tackle the lib folder templateUrls later.

@rkirov
Copy link
Contributor

rkirov commented Jan 27, 2015

I see that #1650 fixes the lib issue I raised, so I think this is fine. Can you merge this one into #1650 so we don't accidentally end up in a problematic state (merging only one by mistake, or rolling back one of them).

@TedSander
Copy link
Contributor Author

Merged with #1650 going to close this request.

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

Successfully merging this pull request may close these issues.

Angular's transformers do not follow Barbacks asset resolution.
4 participants