We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
开启 ssr 后输出产物中的前端路由链接 href 没有正确的 base 前缀
ssr
href
base
Steps to reproduce the behavior:
exportStatic
publicPath
/a/
outputPath
dist/a
dist
/a
Expected behavior
前端路由连接的 href 值为 /a/ 前缀
关键代码位置:https://github.com/umijs/umi/blob/master/packages/renderer-react/src/server.tsx#L17
The text was updated successfully, but these errors were encountered:
6. 检查源代码中前端路由连接的 href 值会发现不是 /a/ 前缀
确实不是 /a/ 前缀, 但是启动 dist server 后点击 href 还是正常跳转了的, 这是一个 bug 吗?
Sorry, something went wrong.
是 bug,点击能正确跳转应该是因为 react-router 劫持了超链接默认行为,但对于搜索引擎(SEO)或浏览器(新窗口打开)来说,链接就是错误的了
好, 交给我试试
我现在用的3.5也遇到了这个问题,添加base后,ssr渲染 无法成功,并且控制台总是报did not match错误
did not match
Wxh16144
Successfully merging a pull request may close this issue.
What happens?
开启
ssr
后输出产物中的前端路由链接href
没有正确的base
前缀How To Reproduce
Steps to reproduce the behavior:
ssr
+exportStatic
配置项base
和publicPath
均为/a/
outputPath
为dist/a
dist
目录并通过浏览器访问/a
路径下的应用href
值会发现不是/a/
前缀Expected behavior
前端路由连接的
href
值为/a/
前缀关键代码位置:https://github.com/umijs/umi/blob/master/packages/renderer-react/src/server.tsx#L17
Context
The text was updated successfully, but these errors were encountered: