Add HtmlBasePlugin option to change posthtml-urls options #4125
Replies: 4 comments
|
+1 |
|
Is there a better way to do this besides merging from a file path in an external dep? |
|
It looks as if the postcss-url plugin merges the options itself. So there would be no reason to do this in the 11ty plugin. https://github.com/posthtml/posthtml-urls/blob/master/lib/index.js#L22 I can't remember why I imported the properties in the 11ty plugin and merged them myself. I haven't tried that, but according to the code, it should work without it. Edit: ah wait.. |
|
Sorry for the accidental transfer. Conveniently we do own the posthtml-urls dependency now: https://github.com/11ty/eleventy-posthtml-urls though! |
Uh oh!
There was an error while loading. Please reload this page.
Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch
@11ty/eleventy@2.0.1for the project I'm working on.I use a lazy image library, that converts
data-srcattributes on images tosrcattributes when the image scrolls into the viewport.posthtml-urlsdoesn't handledata-src(ordata-srcset) attributes, so it would be nice if I could add these additional attributes to theposthtml-urlsfilteroption via plugin options:Here is the diff that solved my problem:
This issue body was partially generated by patch-package.
All reactions