You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-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.
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).
The text was updated successfully, but these errors were encountered:
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
: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 withprefetch
, they are actually downloaded anyway (on the background, idle time etc).The text was updated successfully, but these errors were encountered: