Answer the question
In order to leave comments, you need to log in
How to load vue component from another file (webpack)?
Hello everyone, today I tried to use Vue components.
I don't understand how to import a component from another file using webpack.
index.js:
import comp from './components/component.vue'
Vue.component('comp', comp);
let app = new Vue({
vuetify,
components: {
comp
},
<template>
<div>{{message}}</div>
</template>
<script>
export default {
data () {
return {
message: 'test'
}
}
}
</script>
<!--function (a, b, c, d) { return createElement(vm, a, b, c, d, true); }-->
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question