Subscribe on changes!

Console message saying an element has a duplicate attribute

avatar
Aug 7th 2023

What problem does this feature solve?

This will help with unexplained rendering issues. Where you have duplicate attributes in an element. Example: <span class="fw-bold" :class="{style}"></span>

This error caused a rendering issue but none of the console errors mentioned that there was a duplicate "class" attribute.

What does the proposed API look like?

Add a console message saying either there is a duplicate attribute in a element or that name the attribute and element if possible.

avatar
Aug 7th 2023

Looks like this is actually supported in Vue. Apparently the rendering problem was a textarea tag wasn't closed. Is there anyway to add a message to the console to say a element tag isn't closed?

avatar
Aug 10th 2023

A compilation error will likely be displayed in your terminal if the element is not closed.