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
Source:stackexchange.com