Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

srcset urls get replaced with "undefined" if they're absolute paths #1005

Closed
rbedemann opened this issue Oct 13, 2017 · 0 comments
Closed

srcset urls get replaced with "undefined" if they're absolute paths #1005

rbedemann opened this issue Oct 13, 2017 · 0 comments
Labels

Comments

@rbedemann
Copy link

rbedemann commented Oct 13, 2017

Version

13.3.0

Reproduction link

https://github.com/rbedemann/vue-loader-bug

Steps to reproduce

Use absolute paths (p.ex. for images from static folder) instead of relative paths:

WORKING:
<img src="./logo.png" srcset="./logo.png 2x, ./logo.png 3x" />

NOT WORKING:
<img src="/static/images/logo.png" srcset="/static/images/logo.png 2x, /static/images/logo.png 3x" />

In reproduction link:
1.) check out repo
2.) run npm install
3.) run npm run dev

What is expected?

Paths to images in srcset attribute stay as they are.

What is actually happening?

Paths to images in srcset result in "undefined". the src attribute is still the same like before. I would expect same behaviour for srcset.

@yyx990803 yyx990803 added the bug label Oct 20, 2017
progressman added a commit to progressman/vue-loader that referenced this issue Oct 22, 2017
Typo in line 50 leads to an incorrect path submitted to require.
Return unchanged url for absolute paths.
gejgalis pushed a commit to gejgalis/vue-loader that referenced this issue Nov 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants