Ty3uK / parcel-plugin-pug

Pug template support for Parcel bundler
MIT License
46 stars 6 forks source link

`srcset` in img support? #9

Closed itslooklike closed 6 years ago

itslooklike commented 6 years ago

Hello!

I try to use srcset in img tag, but plugin not resolve urls. In pure html, parcel resolve this ursl, but in pug - not.

Pure HTML:

<img src='./assets/restaurants/restaurant-mcdonalds.png', srcset='./assets/restaurants/restaurant-mcdonalds@2x.png 2x'>

image

Pug

img(src='./assets/restaurants/restaurant-mcdonalds.png', srcset='./assets/restaurants/restaurant-mcdonalds@2x.png 2x')
img(src='./assets/restaurants/restaurant-mcdonalds.png')&attributes({'srcset': './assets/restaurants/restaurant-mcdonalds@2x.png 2x'})

image

i use:

    "parcel-bundler": "1.6.2",
    "parcel-plugin-pug": "0.2.5",

node v9.5.0

Ty3uK commented 6 years ago

Thanks, I’ll add this ASAP 🤝

Sent with GitHawk

Ty3uK commented 6 years ago

Fixed in PR, thanks @dolma!