The company requires Vue to do an end-of-the-Web site, which also contains embedded pages for some apps. Start without thinking so much, directly with VUE-CLI to a single page of Vue project, as the project more and more, more and more pages, the problem began to expose.
As we all know, the advantage of single-page program is to load the corresponding HTML, JavaScript and CSS when the page is initialized, and once the page is loaded, it is no longer necessary to do other loading and jumping, which greatly improves the smoothness of the page and provides a good user experience. So the problem is, putting everything in the initialization time, which results in a longer wait time for the page to load first. And for those pages that are embedded in the app, each load is loaded for the first time, so you know, the experience is very poor.
Next is a series of first load optimization, webpack optimization, JS optimization, CSS optimization and so on, the deletion of the delete, the change, a meal after the operation, and finally will not like the beginning, the app into a page and so on six months. Two words, heart tired.
So it is recommended that the vast number of Vue enthusiasts, if you want to do the app embedded page, it is best not to choose the Frame Vue single page, Vue also support multi-page application ah, haha.
Gold without can't pure, while enjoying some of the advantages of technology, but also to understand some of their shortcomings. It is the only way to improve the efficiency of development to realize reasonable application.
Use Vue to make a hole in the app's embedded page