In the process of learning Vue and I'm wondering about some behavior I've come across. I have my primary markup in place and found a use case for making part of the markup a component. However when I add the component to the container with the rest of the markup (which isn't a component) this markup is removed and just the component markup remains. Is this a feature?
<div id="container">
<Component />
<div class="some-html">
...
</div>
</div>
Once the app is mounted the <div class="some-html">
is removed. In my case this markup will eventually become a component, but for prototyping I was hoping I could mix components with non-components. My current workaround is to wrap the component in a <div>
.
Edit
This instance is using single file components, run through webpack. Using the suggestion in the answer I removed the mount function while using a self-closing tag on the component. This is what the markup looked like (Badge is the name of the component):
<div class="row">
is a sibling to the component: