Skip to content

Commit

Permalink
chore: Update CHANGELOG.md and fix web service HMR issue
Browse files Browse the repository at this point in the history
  • Loading branch information
muxiangqiu committed Oct 20, 2024
1 parent fe835d6 commit c575faf
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
8 changes: 6 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
# Change

## 3.1.0 (待发布)
## 3.2.0 (待发布)

- chore: 升级 typescript 等基础构建工具依赖
- feat(ai-ollama): 添加新组件 `@celljs/ai-ollama`,支持 Ollama 通用能力

## 3.1.0

- chore: 升级并修复 TypeDoc 文档
- feat(core): 添加 Assert 工具类和 MimeType 相关的工具类
- chore: 升级 typescript 等基础构建工具依赖
- fix(web): 修复 web 服务 HMR 不生效问题

## 3.0.0

Expand Down
20 changes: 8 additions & 12 deletions packages/web/src/hooks/serve.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ export class Deferred {

let application: any;
let doDispatch: (req: any, res: any) => void;
let initialized = false;
export async function after(context: ServeContext) {
const { app, entryContextProvider, stats } = context;

Expand Down Expand Up @@ -41,16 +40,13 @@ export async function after(context: ServeContext) {
console.error(err);
}
});
if (!initialized) {
initialized = true;
app.all('*', async (req: any, res: any) => {
try {
await compileDeferred.promise;
} catch (err) {
res.status(500).send(err);
}
doDispatch(req, res);
});
}
app.all('*', async (req: any, res: any) => {
try {
await compileDeferred.promise;
} catch (err) {
res.status(500).send(err);
}
doDispatch(req, res);
});

};

0 comments on commit c575faf

Please sign in to comment.