2๐
โ
If you console.log(vue_cwl)
you can see there is a default
property which contains the actual Vue component. Change your code to use the default
property as the component:
components: {
cwl: vue_cwl.default
}
From my answer to a similar question:
A Vue component is usually exported with
export default { /* ... */}
so it facilitates the default import likeimport Component from './component.vue'
(ES6 syntax)When using require() (CommonJS) you have to specify you are requiring
the default export
In your case you are including directly the component via <script>
but the concept remains.
๐คyuriy636
Source:stackexchange.com