dynamic import 1

Vue Router Lazy Loading

 作者 Puck Wang |  建立於 2019-04-14 12:23  |  更新於 2021-12-12 06:36  |  版本 bfd595b  |  分類: 軟體開發 |  標籤: Front-End, Vue, Web, dynamic import, Lazy, Vue Router

SPA 的網站會因為功能變多造成 build 出來的產物越來越大,雖然 Webpack 可以切 Chunk,但也會讓載入的時間變長,此時可以搭配 Vue 的 Components Dynamic Async 的功能,讓 Component 只在使用到的時候才去載入,不會一次就全部載完。

Continue Reading...