Reputation: 86
in my case i have a page on the vuejs app that needs a Three.js element, including the library in the index.html seems to increase initial load time too much
i am coding a vue.js (2.x) program under vue-cli with PWA template https://github.com/vuejs-templates/pwa
i am trying to avoid slow initial load times for the app, any suggestions to achieve this with a big library such as three.js would be appreciated thank you
Upvotes: 0
Views: 169
Reputation: 98
It seems what you are lloking for is Code Splitting feature from webpack. You can refer webpack docs for more details. But if you need to understand in short you can take look in these blogs:
Code Splitting With Vue.js And Webpack
3 Code Splitting Patterns For VueJS and Webpack
Upvotes: 1