Skip to content
This repository has been archived by the owner on Mar 27, 2019. It is now read-only.

How to handle asset URLs in templates? #529

Open
jofan opened this issue Apr 8, 2014 · 5 comments
Open

How to handle asset URLs in templates? #529

jofan opened this issue Apr 8, 2014 · 5 comments

Comments

@jofan
Copy link

jofan commented Apr 8, 2014

In CSS asset URLs are rewritten to the appropriate path in build folder but not for templates. I understand that it's not possible for Component to know where the template will be used so I'm curious how other people solve this. Are there any established best practises or recommendations?

@jonathanong
Copy link
Contributor

this should be possible with a plugin, but it'll be a little confusing and more complex. what type of URLs are you using? images?

@jofan
Copy link
Author

jofan commented Apr 8, 2014

Yes. For example:

<img src="img/cat.jpg"> inside my template.

@jonathanong
Copy link
Contributor

hmmm ok. for now i would just use background-image. it's kind of confusing because we would have to figure out which tags to parse, which properties to parse, change properties while preserving styles, etc. but this is inevitable when web components comes out

@jofan
Copy link
Author

jofan commented Apr 8, 2014

Ok, thanks. I'll look into writing a plugin in the meantime.

@remoe
Copy link

remoe commented Aug 7, 2014

👍

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

No branches or pull requests

3 participants