-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
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
[Question] Mako 如何处理React路由的路径问题? #1748
Comments
在使用 React 路由时,遇到的问题通常与浏览器的刷新和直接访问路径有关。这是因为 React 路由通常是单页应用程序(SPA),它们依赖于 JavaScript 来处理路由,而不是服务器。 在开发环境中,通常会使用 然而,Mako 似乎没有直接提供
如果你有进一步的问题或需要更多的帮助,请随时告诉我! 🪧 TipsFor further assistance, please describe your question in the comments and @petercat-assistant to start a conversation with me. |
额...有人能解答么? AI的回答没有解决问题. |
Mako 是一个更纯粹的构建工具,没有提供完整的 dev server 能力。像 history fallback、mock、proxy 之类的,如果你是独立使用 mako,需要自行处理这部分的能力。可以参考 tnf 的实现。 https://github.com/umijs/tnf/blob/master/src/fishkit/server.ts#L56-L60 |
如图,调试的时候
/
路径可以直接访问,且跳转到指定路径.但是直接输入地址就不行.
跳转后刷新页面也不行. <- 这个找了下好像是要设定
historyApiFallback
,但这选项Mako没呀...以前用umi的时候可以在每个路径下生成index.html
不清楚mako需要怎么处理.
The text was updated successfully, but these errors were encountered: