You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
我们的站点是一个多语言站点,在使用约定式路由的情况下,语言作为顶级的动态路由参数,因此有类似以下目录结构:
└── pages
└── [lang$]
├── index.tsx
└── comments.tsx
此时使用ssr+exportStatic,并提供了extraRoutePaths告知需要'/zh-CN/comments'和'/en-US/comments'两个页面的静态输出。并没有按照预期生成相应的html
与此同时,我也尝试了使用配置式路由,可以生成相应的html,但是由于getLocale在ssr下并没有办法拿到路由参数,导致只能使用默认语言渲染内容。(当然这可能是@umijs/plugin-locale插件需要改进的地方)
请问对于这种场景,能否有其他的解决方案让我正确的生成预渲染结果
Beta Was this translation helpful? Give feedback.
All reactions