Skip to content
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

不自定义服务器的话怎么将服务端参数扩展到ctx? #5104

Closed
supwjm opened this issue Jul 26, 2020 · 4 comments
Closed

不自定义服务器的话怎么将服务端参数扩展到ctx? #5104

supwjm opened this issue Jul 26, 2020 · 4 comments

Comments

@supwjm
Copy link

supwjm commented Jul 26, 2020

Background

我试了你们项目中example/ssr-koa, 发现自定义服务器后,热更新无效了,会变成强制更新,而且还会有短暂的服务器崩溃现象,所以我开发环境没有采用自定义服务,而是采用自带的,但我想扩展服务器req到ctx , 文档中只给出了一个自定义服务器的示例,不自定义服务器的话,我改怎么搞?

@williamnie
Copy link
Contributor

自带的暂时没法扩展,理论上不会出现你说的热更新失效,自带的和koa的处理方式应该是一样的,开发模式下,每次重新加载build好的文件,是没问题的,可以提个复现,我看下

@supwjm
Copy link
Author

supwjm commented Aug 2, 2020

自定义服务器热更新失效我提成另外的issue 了,#5103 ,用你们项目中的example/ssr-koa就能复现,修改完文件后,保存,会先出现无法访问,然后再自动刷新。能告知自带的在哪定义的吗?找了老半天,没找着代码在哪。

@github-actions
Copy link

Hello @supwjm. In order to facilitate location and troubleshooting, we need you to provide a realistic example. Please forking these link codesandbox umi or using yarn create @umijs/umi-app to create and upload it to your GitHub repository.

你好 @supwjm, 为了方便定位和排查问题,我们需要你提供一个重现实例,请提供一个尽可能精简的链接 codesandbox umi 或使用 yarn create @umijs/umi-app 创建,并上传到你的 GitHub 仓库。

@github-actions
Copy link

Since the issue was labeled with Need Reproduce, but no response in 3 days. This issue will be closed. If you have any questions, you can comment and reply.
由于该 issue 被标记为需要可复现步骤,却 3 天未收到回应。现关闭 issue,若有任何问题,可评论回复。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants