I come from Vue 2 and I was used to have my wordpress standard html pages and use some Vue components inside them. Just passed the container to the main app el
property, and then I could use components on the container, where I wanted to, without having all the default container's content be erased or replaced. Basically, passing a dom element to the el
property, maked that element a Vue app, with all its contents (even without any Vue components).
With Vue 3 and createApp, it seems there's no way of doing it, since as soon as I mount the app to a container (say #app), then all the container's contents are erased or replaced with component's template (if a component is passed). Even the following, which doesn't use any component, is going to clear all the #app original contents:
import { createApp } from 'vue'
createApp({
}).mount('#app');
How to avoid? How to just use some spare components on a free html page? And how about SFC used the same way?