From 8eb2a512874a71baaebcc38f10e39d936a2096b3 Mon Sep 17 00:00:00 2001 From: eps1lon Date: Thu, 17 Oct 2024 13:51:22 +0200 Subject: [PATCH] Ensure next-dev-server usages can be found It looked like it was never referenced because we only `require()` it. Now we import the type to check soundness and have it appear as referenced. --- packages/next/src/server/next.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/next/src/server/next.ts b/packages/next/src/server/next.ts index 83683ab617c3e..7ebfef9dfa1c4 100644 --- a/packages/next/src/server/next.ts +++ b/packages/next/src/server/next.ts @@ -169,7 +169,8 @@ export class NextServer { ): Promise { let ServerImplementation: typeof Server if (options.dev) { - ServerImplementation = require('./dev/next-dev-server').default + ServerImplementation = require('./dev/next-dev-server') + .default as typeof import('./dev/next-dev-server').default } else { ServerImplementation = await getServerImpl() }