0👍
If you shown the complete home.vue file, the script part with the export is missing:
<template>
<div class="home">Hello from home</div>
</template>
<script>
export default {
name: "Home"
}
</script>
Or it may be also related to this line:
mix.js('resources/js/app.js', 'public/js')
You should try with:
mix.js('resources/js/app.js', 'public/js').vue()
- [Vuejs]-Rendering HTML with Vue combined inside a Vue component
- [Vuejs]-Sequelize / Vue / Node – I'd like to use a query to filter data after it has been returned to my view
0👍
While working with Vue, make sure that following dependencies have been properly installed:
- VueJS (of course)
- vue-loader (npm i vue-loader)
- vue-template-compiler (npm i vue-template-compiler)
You can check those dependencies in your package.json file. If they are not there, then your SFC not going to work.
Export default is not a problem. There are compnents with just template and that’s completely fine.
- [Vuejs]-Vue router get full path based on nested route
- [Vuejs]-How to get full tool in toolbar option in trading-vue-js
Source:stackexchange.com