You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm wanting to use a self-hosted sprite file, available at /[email protected] and /[email protected] on the domain where I'm hosting the site.
Putting this in my style file doesn't work:
sprite: '/sprite'
Error: Unable to parse URL object
These also fail: sprite, http:///sprite, ./sprite.
Is there another way to achieve this, or are relative URLs just not supported for sprite files?
This is problematic because it makes deploying more work: I need code that detects whether running locally (localhost:8080//...) or on the deployed site, and now I also need to know the deployed site's URL.
Activity
stevage commentedon Jul 11, 2019
Well, I guess this workaround works:
mourner commentedon Jul 11, 2019
We don't support relative URLs intentionally — see the discussion at #3636 and linked tickets.
stevage commentedon Jul 12, 2019
Thanks for the context. Interesting rationale. Makes sense that a style file needs to work in contexts other than web, I guess.