{path: '/login', name: 'login', meta: {title: 'login'}, Component: () => import(/* webpackChunkName: "login" */ '.. /pages/mobile/views/login.vue') },
Vuecli3 provides a way to import a route lazily. Import is defined as import on demand. When you access the route, import the component
/* webpackChunkName: “login” /* webpackChunkName: “login” /* webpackChunkName: “login” */
After configuration, refresh the browser and see that the route is still loaded.
Purpose: prefetch, Accept: Application /signed-exchange checked the MDN and found that this is a behavior of the browser to prefetch links, which are only downloaded when the browser is idle, taking up bandwidth, and preparing the page in advance without affecting the startup speed
A search for the prefetch keyword shows that Webpack can achieve the unprefetch behavior by removing this. Add this to get the desired effect.
Finally have wrong 👏 welcome to correct…