[Vuejs]-Laravel – 9 Vite with vue cli 3 – vue-router error

1πŸ‘

βœ…

Run: npm run watch
Then move your files from /resources/js to /resources/js/src.
Then, I suggest you make your file named route as a router.

The name "components" or "views" does not matter, but I would prefer to create a folder named "views" and create "components" in it.

Then you can try to import like these according to the path you will create:

import Home from '../views/index.vue';

or

import Home from '../views/components/home/index.vue';

Finally, don’t forget to run: php artisan optimize:clear

Leave a comment