I am trying to incorporate vue multiselect into my Vue app that I created without using the cli. My app is built with plain JS and all the content is within my HTML file. However, I am having trouble importing libraries such as Vue Multiselect :( In HTML:
<body>
<div id="app">
<multiselect v-model="value" tag-placeholder="Add this as new tag" placeholder="Search or
add a tag" label="name" track-by="code" :options="options" :multiple="true" :taggable="true" @tag="addTag"></multiselect>
</div>
<script src="../assets/js/vue.js"></script>
<script src="https://unpkg.com/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="f0868595dd9d859c849983959c959384b0c2dec1dec0">[email protected]</a>"></script>
<script type="module" src="../assets/js/user-list.js">
</script>
</body>
In JS:
new Vue({
data() { return {} }
}).$mount(#app)
I am unable to import it in the way I would do with vue cli, like:
import multiselect from 'vue-multiselect'
and
components: { multiselect}
when I try to import, I encounter errors such as:
Uncaught TypeError: Error resolving module specifier “vue”. Relative module specifiers must start with “./”, “../” or “/”.