webpack的配置如下
new PrerenderSpaPlugin(
// (REQUIRED) Absolute path to static root
path.join(__dirname, '../dist'),
// (REQUIRED) List of routes to prerender
['/','/reg','/pwdfy']
)
npm run build 之后生成了如下目录结构
但是3个index页面的内容是一样的,都是第一个'/'这个路由的内容,是我哪里没有配置吗?
index.html:
针对本问题的解决方案,将路由模式改为history,可以渲染出预期的3个页面.但是因为后续的一些问题,没有继续下去.