The redirect to / home, global style does not take effect when vue-router uses /, but the style takes effect when it is used directly / home

Global styles are placed under assets under src, and inport is introduced in main.js.
after packaging and deployment, the global style of redirect to / home, does not take effect when / is used and needs to be refreshed, but it takes effect when it is directly / home.
routing is introduced using require.ensure

Feb.22,2022

relative path problem? router has a from : where to transfer, to : the concept of where to go, and whether the path of static resources will be affected by both of them. You can take a look at


I also encountered the same problem. For the solution, take a look at the official website ide/essentials/dynamic-matching.html-sharp%E5%93%8D%E5%BA%94%E8%B7%AF%E7%94%B1%E5%8F%82%E6%95%B0%E7%9A%84%E5%8F%98%E5%8C%96" rel=" nofollow noreferrer "> official website routing

.
Menu