Isn’t it very slow when loading for the first time? Is my question reasonable? How to deal with it?
天蓬老师2017-05-16 13:44:05
There are too many components, so routing is usually added, right? Then just use lazy loading in vue-router...
https://router.vuejs.org/zh-c...
伊谢尔伦2017-05-16 13:44:05
Can be loaded asynchronously. For example, if I have 10 pages, the total package size may be 10M, which is definitely too large. Then I can package the home page and load the others asynchronously, loading which one is accessed. This will make it faster to open for the first time.
You can see vue-router documentation for lazy loading https://router.vuejs.org/zh-c...
高洛峰2017-05-16 13:44:05
Added that vue2 also has a server-side rendering solution that can solve performance problems