Comments (11)
我也试过,所以这里没有用browserHistory
,需要讨论下
from antd-admin.
用browserHistory的话,需要服务端渲染吧
from antd-admin.
好吧,原来还有dora的这个插件dora-plugin-browser-history。。。
感谢@pmg1989,结案
相关修改#82
from antd-admin.
使用了browserHistory,刷新会下载一个文件,请问怎么解决
from antd-admin.
@miaoyinjun 没太明白,是刷新后浏览器中自动下载文件吗?什么样的文件?
from antd-admin.
比较我访问home这个路由,就会下载home文件内容是index的内容
from antd-admin.
这个有点奇怪了,我建议你按照这次#82commit的内容查一下,并不是只有router和index.js有修改,我这里改完以后是可以的。(最好重新编译一下)你试试看有没有问题,还不行的话晚点下班了改改我本地的工程,看什么情况下会有这种情况
from antd-admin.
补充下,我用的是index.ejs
from antd-admin.
啊~ 你用了ejs模板啊,这个我以前为了配合打包以后文件名里加的MD5后缀用过,如果你确定你修改的跟commit一致,可能是用模板搭配webpack里改文件名的姿势不对(如果有的话)
from antd-admin.
现在我将index.ejs修改为index.htnl,HtmlWebpackPlugin的注掉了,index.js修改了
import './index.html'; import dva from 'dva'; import {browserHistory} from 'dva/router'; const app = dva({ history: browserHistory, onError (error) { console.error('app onError -- ', error) } });
package.json
"start": "dora --plugins "proxy,webpack,webpack-hmr,browser-history?index=/src/index.html"",
重启访问发现浏览器的
是空白from antd-admin.
如果有时间,请帮忙解决下,谢谢
from antd-admin.
Related Issues (20)
- Failed to load resource: the server responded with a status of 404 (Not Found) 开发环境是正常的,打包后浏览器打开出问题 HOT 3
- 自己写登录接口 HOT 1
- 强强
- 能否提供个typescript版的 HOT 1
- 切换菜单时报错
- 项目启动时报 [ERR_ASSERTION]: filePath not found of antd/lib/locale-provider/pt_BR
- 启动直接报错,我的node版本是18.12.1 HOT 3
- 有没有项目说明文档 HOT 2
- 打开之后无法加载页面 HOT 2
- 111
- Select tag mode bug HOT 1
- npm run start doesn't work HOT 5
- macbook中出现Assertion Error,无法npm run start HOT 3
- develop分支,修改主题色无效 HOT 2
- Proxy 问题 HOT 11
- 技术问题,怎么实现受控表单 HOT 2
- Demo Prevew version diffirence git clone version? HOT 2
- pageing not working HOT 1
- graphgl HOT 1
- auto focus on modal open HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from antd-admin.