|
40 | 40 | // - `serverFunctions.devMiddleware: false` keeps compilation on while the |
41 | 41 | // middleware no longer intercepts `/_server` (a dev POST 404s), and a |
42 | 42 | // host emulation (test/host-dispatch.mjs) proves the manifest + handler |
43 | | -// virtual modules still dispatch through `ssrLoadModule`, |
| 43 | +// virtual modules still dispatch through the SSR module runner, |
44 | 44 | // - builder-order: with an adversarial `builder.buildApp` that builds the |
45 | 45 | // ssr environment first (mimicking e.g. @cloudflare/vite-plugin), the |
46 | 46 | // plugin's client-build-first hook still gets the client manifest baked |
@@ -1791,7 +1791,7 @@ async function runConfigureMode() { |
1791 | 1791 | // 404. Then test/host-dispatch.mjs emulates the host that owns dispatch |
1792 | 1792 | // instead (a metaframework or an environment plugin like |
1793 | 1793 | // @cloudflare/vite-plugin): manifest + handler virtual modules loaded |
1794 | | -// through `ssrLoadModule`, request dispatched like production. |
| 1794 | +// through the SSR module runner, request dispatched like production. |
1795 | 1795 | async function runNoMiddlewareMode() { |
1796 | 1796 | const mode = 'no-middleware'; |
1797 | 1797 | console.log(`\n=== ${mode.toUpperCase()} ===`); |
@@ -2721,7 +2721,9 @@ async function runMiddlewareMode() { |
2721 | 2721 | // middleware route reading getRequestEvent()) carries exactly those |
2722 | 2722 | // fields — createRequestEvent(request, options.event) spreads them |
2723 | 2723 | // over the event defaults. |
2724 | | - const handlerModule = await probe.ssrLoadModule('virtual:solid-ssr-handler'); |
| 2724 | + const handlerModule = await probe.environments.ssr.runner.import( |
| 2725 | + 'virtual:solid-ssr-handler', |
| 2726 | + ); |
2725 | 2727 | const seamResponse = await handlerModule.handleRequest( |
2726 | 2728 | new Request('http://localhost/api/native', { headers: { accept: 'application/json' } }), |
2727 | 2729 | { event: { nativeEvent: { socket: { remoteAddress: '203.0.113.7' } } } }, |
@@ -3193,7 +3195,7 @@ async function runExternalMode() { |
3193 | 3195 | server = await createServer({ root: exampleDir, server: { middlewareMode: true } }); |
3194 | 3196 | const clientModule = await server.environments.client.transformRequest('/src/api.ts'); |
3195 | 3197 | const functionId = extractFunctionId(clientModule?.code || '', 'getServerMessage'); |
3196 | | - const handler = await server.ssrLoadModule('virtual:solid-ssr-handler'); |
| 3198 | + const handler = await server.environments.ssr.runner.import('virtual:solid-ssr-handler'); |
3197 | 3199 | const response = await handler.handleRequest(new Request('http://localhost/')); |
3198 | 3200 | const html = await response.text(); |
3199 | 3201 | record( |
|
0 commit comments