File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -57,12 +57,17 @@ export function solidStart(options?: SolidStartOptions): Array<PluginOption> {
5757 configEnvironment ( name ) {
5858 return {
5959 resolve : {
60+ noExternal : [ "h3" ] ,
6061 // remove when https://github.com/solidjs/vite-plugin-solid/pull/228 is released
6162 externalConditions : [ "solid" , "node" ] ,
6263 } ,
6364 } ;
6465 } ,
6566 async config ( _ , env ) {
67+ _ . ssr ??= { } ;
68+ _ . ssr . resolve ??= { } ;
69+ _ . ssr . resolve . conditions ??= [ ] ;
70+ _ . ssr . resolve . conditions . push ( "generic" ) ;
6671 const clientInput = [ handlers . client ] ;
6772 if ( env . command === "build" ) {
6873 const clientRouter : BaseFileSystemRouter = ( globalThis as any ) . ROUTERS . client ;
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ import { matchAPIRoute } from "./routes.ts";
1212import { handleServerFunction } from "./server-functions-handler.ts" ;
1313import type { APIEvent , FetchEvent , HandlerOptions , PageEvent } from "./types.ts" ;
1414import { getExpectedRedirectStatus } from "./util.ts" ;
15+ import { FastResponse } from "srvx/node" ;
1516
1617const SERVER_FN_BASE = "/_server" ;
1718
@@ -114,7 +115,7 @@ export function createBaseHandler(
114115 // using TransformStream in dev can cause solid-start-dev-server to crash
115116 // when stream is cancelled
116117 // send fast node streams (for now this is only available in nodejs)
117- if ( e . runtime ?. name === "node" ) return stream ;
118+ if ( e . runtime ?. name === "node" ) return new FastResponse ( stream ) ;
118119
119120 // returning stream directly breaks cloudflare workers
120121 const { writable, readable } = new TransformStream ( ) ;
You can’t perform that action at this time.
0 commit comments