Closed sinianzhiren closed 2 years ago
自行查看midway2.x的文档
自行查看midway2.x文档
发自我的iPhone
------------------ 原始邮件 ------------------ 发件人: Alex @.> 发送时间: 2022年4月5日 11:16 收件人: zhangyuang/ssr @.> 抄送: Subscribed @.***> 主题: Re: [zhangyuang/ssr] midway-react-ssr 安装插件问题 (Issue #179)
import { Configuration } from @./decorator"; import { initialSSRDevProxy } from 'ssr-server-utils' import { Application } from 'egg'; import as swagger from **@.***/swagger';
@configuration({ imports: [ // ... { component: swagger, enabledEnvironment: ['local'] } ] }) class AppBootHook { app: Application constructor (app) { this.app = app }
async willReady () { await initialSSRDevProxy(this.app) } }
export default AppBootHook
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>
你好,我发现 midway-react-ssr 模板中的midway的代码,是修改后的,不同于midway教程中的代码,比如我要添加midway中swagger组件,按照midway官方文档好像,实现不了,这部分还有其他文档吗
import { Configuration } from "@midwayjs/decorator"; import { initialSSRDevProxy } from 'ssr-server-utils' import { Application } from 'egg'; import * as swagger from '@midwayjs/swagger';
@configuration({ imports: [ // ... { component: swagger, enabledEnvironment: ['local'] } ] }) class AppBootHook { app: Application constructor (app) { this.app = app }
async willReady () { await initialSSRDevProxy(this.app) } }
export default AppBootHook