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
修改了路由模式为 BrowserRouter,站点服务器也做好了配置。开发模式一切正常,发布后发现页面无法正常访问。这时候你就要想是否是资源路径配置的问题了。
BrowserRouter
看似是小问题,但常常会忽略,导致折腾了数个小时才排查到,具体细节不说了
如果是使用 create-react-app 这个打包奇慢无比的脚手架,你只需要在“官方文档”的帮助下,修改配置即可。在 package.json 文件中添加一个节点,具体为:
create-react-app
package.json
"homepage": "/"
--完--
The text was updated successfully, but these errors were encountered:
No branches or pull requests
前言
修改了路由模式为
BrowserRouter
,站点服务器也做好了配置。开发模式一切正常,发布后发现页面无法正常访问。这时候你就要想是否是资源路径配置的问题了。配置
如果是使用
create-react-app
这个打包奇慢无比的脚手架,你只需要在“官方文档”的帮助下,修改配置即可。在package.json
文件中添加一个节点,具体为:--完--
The text was updated successfully, but these errors were encountered: