Skip to content

Commit 9942be9

Browse files
committed
Fix server fns manifest and plugin
1 parent d222a32 commit 9942be9

2 files changed

Lines changed: 4 additions & 5 deletions

File tree

packages/start/src/config/server-functions.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,8 +272,9 @@ export function serverFunctionsPlugin(
272272
},
273273
{
274274
name: "solid-start:server-functions/compiler",
275-
async transform(code, id, opts) {
275+
async transform(code, fileId, opts) {
276276
const mode = opts?.ssr ? 'server' : 'client';
277+
const [id] = fileId.split('?');
277278
if (!filter(id)) {
278279
return null;
279280
}

packages/start/src/fns/manifest.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
1-
type HandlerRegistration = [id: string, callback: Function];
2-
3-
const REGISTRATIONS = new Map<string, HandlerRegistration>();
1+
const REGISTRATIONS = new Map<string, Function>();
42

53
export function registerServerFunction<T extends any[], R>(
64
id: string,
75
callback: (...args: T) => Promise<R>,
86
) {
9-
REGISTRATIONS.set(id, [id, callback]);
7+
REGISTRATIONS.set(id, callback);
108
return callback;
119
}
1210

0 commit comments

Comments
 (0)