Skip to content

Commit 55cb6c5

Browse files
committed
add type for USING_SOLID_START_DEV_SERVER
1 parent 1a00774 commit 55cb6c5

3 files changed

Lines changed: 3 additions & 2 deletions

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export function devServer(): Array<PluginOption> {
3030
return;
3131
}
3232

33-
(globalThis as any).USING_SOLID_START_DEV_SERVER = true;
33+
globalThis.USING_SOLID_START_DEV_SERVER = true;
3434

3535
removeHtmlMiddlewares(viteDevServer);
3636

packages/start/src/internal.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ declare module "h3" {
1010
import type { Rollup } from "vite";
1111
declare global {
1212
var START_CLIENT_BUNDLE: Rollup.OutputBundle;
13+
var USING_SOLID_START_DEV_SERVER: boolean | undefined
1314
}

packages/start/src/server/handler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ export function createBaseHandler(
120120

121121
// using TransformStream in dev can cause solid-start-dev-server to crash
122122
// when stream is cancelled
123-
if((globalThis as any).USING_SOLID_START_DEV_SERVER) return stream
123+
if(globalThis.USING_SOLID_START_DEV_SERVER) return stream
124124

125125
// returning stream directly breaks cloudflare workers
126126
const { writable, readable } = new TransformStream();

0 commit comments

Comments
 (0)