项目使用的是dva+react,部署在nginx服务器上。
里面使用了browserhistory,在nginx里面也配置了
location / {
try_files $uri /index.html;
}
刷新的时候还是空白界面
是不是项目里哪里写错了
import { browserHistory } from 'dva/router'
const app = dva({
history: browserHistory,
});
后面的router直接引用的history
<Router history={history}>
reason 1
reason 2
reason 3