Skip to content

Commit

Permalink
🐛 fix: fix gateway runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
arvinxx committed Jan 11, 2024
1 parent 8b1a443 commit f181fa3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pages/api/gateway.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { createGatewayOnEdgeRuntime } from '@lobehub/chat-plugins-gateway';

export const config = {
runtime: 'edge',
};

export default async (req: Request) => {
if (process.env.NODE_ENV === 'development') {
const { createGatewayOnEdgeRuntime } = await import('@lobehub/chat-plugins-gateway');

return createGatewayOnEdgeRuntime()(req);
}

Expand Down

0 comments on commit f181fa3

Please sign in to comment.