@@ -178,16 +178,32 @@ export function solidStart(options?: SolidStartOptions): Array<PluginOption> {
178178 // This is the ID that will be available to look up and import
179179 // our server function manifest and resolve its module
180180 manifestVirtualImportId : VIRTUAL_MODULES . serverFnManifest ,
181- client : {
182- envName : VITE_ENVIRONMENTS . client ,
183- getRuntimeCode : ( ) =>
184- `import { createServerReference } from "${ normalize (
185- fileURLToPath ( new URL ( "../server/server-runtime" , import . meta. url ) ) ,
186- ) } "`,
187- replacer : ( opts ) =>
188- `createServerReference(${ ( ) => { } } , '${ opts . functionId } ', '${ opts . extractedFilename } ')` ,
189- } ,
190- server : {
181+ directive : "use server" ,
182+ callers : [
183+ {
184+ envConsumer : "client" ,
185+ envName : VITE_ENVIRONMENTS . client ,
186+ getRuntimeCode : ( ) =>
187+ `import { createServerReference } from "${ normalize (
188+ fileURLToPath ( new URL ( "../server/server-runtime" , import . meta. url ) ) ,
189+ ) } "`,
190+ replacer : ( opts ) =>
191+ `createServerReference('${ opts . functionId } ')` ,
192+ } ,
193+ {
194+ envConsumer : "server" ,
195+ envName : VITE_ENVIRONMENTS . server ,
196+ getRuntimeCode : ( ) =>
197+ `import { createServerReference } from '${ normalize (
198+ fileURLToPath (
199+ new URL ( "../server/server-fns-runtime" , import . meta. url ) ,
200+ ) ,
201+ ) } '`,
202+ replacer : ( opts ) =>
203+ `createServerReference(${ opts . fn } , '${ opts . functionId } ')` ,
204+ }
205+ ] ,
206+ provider : {
191207 envName : VITE_ENVIRONMENTS . server ,
192208 getRuntimeCode : ( ) =>
193209 `import { createServerReference } from '${ normalize (
@@ -196,7 +212,7 @@ export function solidStart(options?: SolidStartOptions): Array<PluginOption> {
196212 ) ,
197213 ) } '`,
198214 replacer : ( opts ) =>
199- `createServerReference(${ opts . fn } , '${ opts . functionId } ', ' ${ opts . extractedFilename } ' )` ,
215+ `createServerReference(${ opts . fn } , '${ opts . functionId } ')` ,
200216 } ,
201217 } ) ,
202218 {
0 commit comments