Below is a simple Vue component example:
const MyComponent = Vue.component('my-component', {
data () {
// data here...
},
methods: {
// methods here...
},
template: '<p>Hello, world !!!</p>'
});
Is there a way to use an external file to write the HTML code <p>Hello, world!</p>
instead of using a string template?
I am aware that this can be done with single file components (https://v3.vuejs.org/guide/single-file-component.html).
However, due to restrictions in my current context, tools like Vue CLI cannot be used.