mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-09-17 04:12:17 +03:00
Merged in the 2026-09-16 sweep of the maintainer's own open PRs, at the owner's explicit instruction. No push was made to the PR branch: the merge took the head as the owning session left it (verified OPEN, non-draft and MERGEABLE against the release tip immediately before merging).
10 lines
579 B
TypeScript
10 lines
579 B
TypeScript
// #12491 — keep the module-name argument dynamic (never a literal string)
|
|
// when calling a createRequire()-returned function. Turbopack statically
|
|
// detects a literal specifier and rewrites the call to a hashed require()
|
|
// target that resolves only via a `.next`-relative symlink generated at
|
|
// build time, which is absent from the standalone Docker runtime. Mirrors
|
|
// open-sse/utils/tlsClient.ts's loadRuntimeModule().
|
|
export function loadDynamicModule(requireFn: NodeRequire, moduleName: string): unknown {
|
|
return Reflect.apply(requireFn, undefined, [moduleName]);
|
|
}
|