Skip to content

Commit 8fdf669

Browse files
committed
2 parents 3d11da6 + 626becb commit 8fdf669

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

apps/server/server/index.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { ObjectKernel } from '@objectstack/runtime';
1111
import { createHonoApp } from '@objectstack/hono';
1212
import { getRequestListener } from '@hono/node-server';
1313
import type { Hono } from 'hono';
14-
import config from '../objectstack.config';
14+
import stackConfig from '../objectstack.config';
1515

1616
// ---------------------------------------------------------------------------
1717
// Singleton state — persists across warm Vercel invocations
@@ -38,7 +38,11 @@ async function ensureKernel(): Promise<ObjectKernel> {
3838
const kernel = new ObjectKernel();
3939

4040
// Register all plugins from shared config
41-
for (const plugin of config.plugins ?? []) {
41+
if (!stackConfig.plugins || stackConfig.plugins.length === 0) {
42+
throw new Error(`[Vercel] No plugins found in stackConfig`);
43+
}
44+
45+
for (const plugin of stackConfig.plugins) {
4246
await kernel.use(plugin as any);
4347
}
4448

0 commit comments

Comments
 (0)