MCPcopy Create free account
hub / github.com/arktypeio/arktype / dependsOnNext

Function dependsOnNext

ark/aot/unplugin.ts:3286–3294  ·  view source on GitHub ↗
(root: string)

Source from the content-addressed store, hash-verified

3284// Next.js leaves the pages router's dependencies external on the server
3285// where bundlePagesRouterDependencies isn't set
3286const dependsOnNext = (root: string): boolean => {
3287 const manifest = join(root, "package.json")
3288 if (!existsSync(manifest)) return false
3289 const { dependencies, devDependencies } = parsePackageManifest(
3290 readFileSync(manifest, "utf8"),
3291 manifest
3292 )
3293 return "next" in { ...dependencies, ...devDependencies }
3294}
3295
3296const isExternalIn = (external: unknown, specifier: string): boolean =>
3297 typeof external === "function" ? !!external(specifier, undefined, false)

Callers 1

keepCompilerFunction · 0.85

Calls 2

parsePackageManifestFunction · 0.90
joinFunction · 0.85

Tested by

no test coverage detected