'Vue3 - autocomplete component without webpack

I am using Vue3 without Webpack and now I need to use a component for auto-complete. I have found this answer for Vue 2 and I tried to apply the same with Vue3 as follow:

const app = Vue.createApp({
  ...
}).component('autocomplete', {
    Autocomplete: window["vuejs-autocomplete"]
})
<autocomplete :source="[{id:1,name:'abc'},{id:2,name:'def'}]"></autocomplete>

But then I get the following warning in the console:

[Vue warn]: Component is missing template or render function. 
  at <Autocomplete source= (2) [{…}, {…}] > 
  at <App>

I get the same result if I try to use V-select like this:

const app = Vue.createApp({
  ...
}).component('v-select', {
    vSelect: {
        VueSelect: window["v-select"]
    }
})
<v-select :options="options"></v-select>

How could we use CDN component in Vue 3 without Webpack? Thanks!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source