Can't use camelCase props, breaks SVG tags with viewBox, preserveAspectRatio, etc.
mgdodge opened this issue · 2 comments
I have a Vue icon library that incorporates SVG icons. Since the component just wraps raw SVG tags, all valid attributes should be allowed. Updating to 1.15.0+ breaks the documentation site for the icon library. For example:
<my-vue-icon
name="some-icon"
:size="[140, 60]"
preserveAspectRatio="xMidYMid slice"
/>
This would work in 1.14.x, but breaks in 1.15.0 and newer. SVG attributes are case-sensitive, so you can't just use lowercase or kebab-case versions of them.
I know there is benefit to highlighting errors, but perhaps you could make this configurable, so it can be turned off or use a case-insensitive regex when required? I would even settle for accepting a whitelist of known attributes, which could save the overhead of running the regex if it is found in the list (I know, micro-optimization...)
I am happy with the way this works in the @next branch, have been using it for several months. I don't personally have any use for porting this back to Vue 2, however. Does this need to be left open until that is done? Or can this be closed? #housekeeping
It can be closed I believe. Thank you for reporting.