The execution order when loading files vue

1, performs index.html file

2, file execution main.js

. 3, the mount main.js app.vue file index.html app.vue replaced with templete in <div id = "app"> </ div >

. 4, is injected into the routing main.js file, to render the corresponding components of the router-view

5, router-view loaded Layout files

6, Layout loaded Navbar, Sidebar, AppMain

 

there are two problems

1, the default display index.html file is why the project started

2. Why main.js file loaded by default

these two are in webpack have the appropriate configuration, you can configure View file

 
----------------
Disclaimer: This article is the original article CSDN bloggers "kimmmmqin", and follow CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
Original link: https: //blog.csdn.net/kimmmmqin/article/details/100203008

Guess you like

Origin www.cnblogs.com/sandea/p/12145397.html