Currently, I am working with Laravel 10, Vite, and Vue
I would like to incorporate two components into my App.vue file
Below is the content of my App.vue file :
<template>
<div>
<AppHeader></AppHeader>
... Content ...
<AppFooter></AppFooter>
</div>
</template>
<script setup>
import AppHeader from "./components/partials/AppHeader.vue";
import AppFooter from "./components/partials/AppFooter.vue";
export default {
components : {
AppHeader,
AppFooter,
}
}
</script>
An error message popped up indicating:
[vite:vue] [@vue/compiler-sfc] <script setup> cannot contain ES module exports. If you are using a previous version of <script setup>, please consult the updated RFC at https://github.com/vuej
s/rfcs/pull/227.
C:/xampp/htdocs/laravel/rest_api/resources/js/components/App.vue
9 | <script setup>
10 | import AppHeader from "./components/partials/AppHeader.vue";
11 | import AppFooter from "./components/partials/AppFooter.vue";
| ^
12 | export default {
| ^^^^^^^^^^^^^^^^
13 | components : {
| ^^^^^^^^^^^^^^^^^^
14 | AppHeader,
| ^^^^^^^^^^^^^^^^^^
15 | AppFooter,
| ^^^^^^^^^^^^^^^^^^
16 | }
| ^^^^^
17 | }
| ^
Your assistance on this matter would be greatly appreciated.
I'm fairly new to Vue and currently following a tutorial for guidance