Closed
Description
Version
3.0.0-beta.6
Reproduction link
https://github.com/noscript/vue-cli-lazy-load
Steps to reproduce
Change About to an async component in router.js
:
-import About from "./views/About.vue";
+const About = () => import("./views/About.vue");
Serve the app and open in browser. Check Networks tab in Chrome devtools, chunk 0.js
is downloaded with prefetch. Visit About view, 0.js
is downloaded normally.
What is expected?
Chunk is downloaded only when visiting the route, according to https://router.vuejs.org/en/advanced/lazy-loading.html
What is actually happening?
Chunks from all async components are downloaded at once.
This is a regression from vue-cli 2.9.3
. Although the chunks are defined with prefetch
, they are actually downloaded anyway (on the background, idle time etc).
Metadata
Metadata
Assignees
Labels
No labels