I am attempting to achieve the following:
import Vue from "vue";
import Router from "vue-router";
import Home from "./views/Home.vue";
import LoadingComponent from '@/components/Loading.vue';
Vue.use(Router);
const router = new Router({
routes: [
{
path: "/",
name: "home",
component: Home
},
{
path: "/about",
name: "about",
component: () => ({
component: import("./views/About.vue"),
loading: LoadingComponent,
delay: 1
})
}
]
});
export default router;
However, the loading component never appears, even when I set the network to Slow 3G
.
This issue only occurs when I use async components in the router; elsewhere, the loading component displays after the designated delay.
Is this a limitation of Vue Router or am I overlooking something in my implementation?