When deploying a Laravel and Vue application using Vue Router, the components are not mounting on my div with id app. What could be causing this issue?
The application is hosted on a shared hosting server, with the Laravel application located in a project folder.
I have defined the variables APP_URL
and ASSET_URL
to be mydomain.com/project/
In the Vue Router routes, the starting point is set as /admin
const routes = [
{
path: '/admin',
children: [
...]
Vue.use(VueRouter);
const router = new VueRouter({
mode: 'history',
routes
})
The index file within the public folder appears to be fine. Initially, the login page displays correctly, user validation works, but upon logging in from the backend, redirection to the admin path where the Vue Router should act does not occur.
I have tried various approaches, including starting the path with /
in my Vue Router routes, without success.
No errors are being displayed in the console or Laravel logs
Edit
new Vue({
el: '#app',
store,
router,
render: h => h(App)
});