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

Function checkBundledExternals

ark/aot/unplugin.ts:451–465  ·  view source on GitHub ↗
(
		bundle: BundleModules,
		warn = (message: string) => console.warn(message),
		noExternal?: string
	)

Source from the content-addressed store, hash-verified

449 // tsup and tsdown leave dependencies external through a plugin of their
450 // own, which only the bundle shows
451 const checkBundledExternals = async (
452 bundle: BundleModules,
453 warn = (message: string) => console.warn(message),
454 noExternal?: string
455 ) => {
456 if (!isStandalone || opts?.shadow) return
457 const specifier = unsharedExternalOf(bundle)
458 const problem =
459 specifier ?
460 writeBundledExternalMessage(specifier)
461 : await bundledDependentProblemOf(bundle, noExternal)
462 if (!problem) return
463 if (opts?.allowUnsafe) warn(problem)
464 else throwBuildError(withAllowUnsafe(problem))
465 }
466 const bundledDependentProblemOf = async (
467 bundle: BundleModules,
468 noExternal: string | undefined

Callers 2

checkEsbuildBundleFunction · 0.85
buildEndFunction · 0.85

Calls 4

throwBuildErrorFunction · 0.90
unsharedExternalOfFunction · 0.85
warnFunction · 0.70

Tested by

no test coverage detected