Git Product home page Git Product logo

Comments (11)

zuiidea avatar zuiidea commented on May 13, 2024

我也试过,所以这里没有用browserHistory,需要讨论下

from antd-admin.

miaoyinjun avatar miaoyinjun commented on May 13, 2024

用browserHistory的话,需要服务端渲染吧

from antd-admin.

xiaosansiji avatar xiaosansiji commented on May 13, 2024

好吧,原来还有dora的这个插件dora-plugin-browser-history。。。
感谢@pmg1989,结案
相关修改#82

from antd-admin.

miaoyinjun avatar miaoyinjun commented on May 13, 2024

使用了browserHistory,刷新会下载一个文件,请问怎么解决

from antd-admin.

xiaosansiji avatar xiaosansiji commented on May 13, 2024

@miaoyinjun 没太明白,是刷新后浏览器中自动下载文件吗?什么样的文件?

from antd-admin.

miaoyinjun avatar miaoyinjun commented on May 13, 2024

比较我访问home这个路由,就会下载home文件内容是index的内容

from antd-admin.

xiaosansiji avatar xiaosansiji commented on May 13, 2024

这个有点奇怪了,我建议你按照这次#82commit的内容查一下,并不是只有router和index.js有修改,我这里改完以后是可以的。(最好重新编译一下)你试试看有没有问题,还不行的话晚点下班了改改我本地的工程,看什么情况下会有这种情况

from antd-admin.

miaoyinjun avatar miaoyinjun commented on May 13, 2024

补充下,我用的是index.ejs

from antd-admin.

xiaosansiji avatar xiaosansiji commented on May 13, 2024

啊~ 你用了ejs模板啊,这个我以前为了配合打包以后文件名里加的MD5后缀用过,如果你确定你修改的跟commit一致,可能是用模板搭配webpack里改文件名的姿势不对(如果有的话)

from antd-admin.

miaoyinjun avatar miaoyinjun commented on May 13, 2024

现在我将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.

miaoyinjun avatar miaoyinjun commented on May 13, 2024

如果有时间,请帮忙解决下,谢谢

from antd-admin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.