lavas-project / vue-skeleton-webpack-plugin

Lavas webpack plugin: skeleton solution for PWA webshell
886 stars 130 forks source link

请问如何针对多页面的不同路由进行配置? #57

Closed defypro closed 5 years ago

defypro commented 5 years ago

例如:a.html/#/home和b.html/#/home

defypro commented 5 years ago

if (isMPA) { routes = routes.filter(route => route.entryName === entryName); }

看到了这段代码,entryName是否是用来区分不同入口下的路由

PengXing commented 5 years ago

从代码上看来,是不支持的

defypro commented 5 years ago

已经测试过了,是可以的。 文档中只是说明了routes支持 pathskeletonId两个参数,其实还可以添加entryName参数用来区分不同入口的路由。不过作者并没有更新到文档上去,不知道是否是有其他的考虑。