[Vuejs]-"Failed to mount component: template or render function not defined" in Vue, despite using full compiler bundle

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 like import 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

Leave a comment