diff --git a/app/misc/entry-hattip.ts b/app/misc/entry-hattip.ts index 4cd8361545..41b34135f2 100644 --- a/app/misc/entry-hattip.ts +++ b/app/misc/entry-hattip.ts @@ -1,3 +1,4 @@ +import * as build from "virtual:remix/server-build"; import { type RequestHandler, compose } from "@hattip/compose"; import { once } from "@hiogawa/utils"; import { createLoggerHandler } from "@hiogawa/utils-hattip"; @@ -10,10 +11,6 @@ import { pathToRegExp } from "../utils/misc"; import { traceAsync } from "../utils/opentelemetry-utils"; import { initializeServer } from "./initialize-server"; -// @ts-ignore isort-ignore -import * as remixViteBuild from "virtual:remix/server-build"; -const build = remixViteBuild as typeof import("@remix-run/dev/server-build"); - // based on https://github.com/hi-ogawa/vite-fullstack-example/blob/92649f99b041820ec86650c99cfcd49a72e79f71/src/server/hattip.ts#L16-L28 export function createHattipEntry() { diff --git a/app/types/remix.d.ts b/app/types/remix.d.ts new file mode 100644 index 0000000000..43d7988a45 --- /dev/null +++ b/app/types/remix.d.ts @@ -0,0 +1,3 @@ +declare module "virtual:remix/server-build" { + export * from "@remix-run/dev/server-build"; +}