Closed davestewart closed 1 year ago
Right now, supported tags and attributes are internally configured.
This means that whilst an <img src=""> will have its src transformed, <CustomImage image="" /> will not.
<img src="">
src
<CustomImage image="" />
Some way to configure per asset or per attribute what to transform, for example, default config:
{ attrsMap: { 'a': 'href', '*': 'src', 'CustomImage': 'image', } }
This would target:
CustomImage
image
Maybe even:
{ attrsMap: { '*': 'href src', 'CustomImage': 'image', } }
Or maybe even simply test visited nodes to be elements, then test any string prop against the hash of paths 👍
element
string
Closed by #11
Background
Right now, supported tags and attributes are internally configured.
This means that whilst an
<img src="">
will have itssrc
transformed,<CustomImage image="" />
will not.Proposal
Some way to configure per asset or per attribute what to transform, for example, default config:
This would target:
src
attributeCustomImage
component'simage
attributeMaybe even:
Or maybe even simply test visited nodes to be
element
s, then test anystring
prop against the hash of paths 👍