these two days to do the project with vue+elementUI, a page because of require map json data. When packing, the corresponding js file of the component is much larger, on M. This causes the switch route to enter this page without responding. It took several seconds to switch to this page. I took a look at the console and spent the last few seconds loading the corresponding js file for this component.
so the question is, why don"t I just switch to the corresponding page when I click Navigation to switch routes, and then start loading the js file?
first of all, routing lazy loading has been set, other pages should be relatively small js file is not so obvious, do not feel stutter. But the js file on this page is too large. Catton is obvious. Normally, you should click and switch immediately, so that you can enter the new route first. even if the file load is slow, I can give a prompt that is being loaded to optimize the user experience.
if there are any great gods in such a situation, please give us some advice