variable Loader | globals module | Bun
BuildDocsReferenceGuidesBlogDiscord/
Globals/
LoaderVLoader
Search the reference...
/
BuildDocsReferenceGuidesBlogDiscord/
Globals/
LoaderVLoader
variable
Loaderconst
Loader: { dependencyKeysIfEvaluated: (specifier: string) => string[]; registry: Mapstring, { dependencies: typeof
Loader['registry'] extends Mapany, infer V> ? V : any[]; evaluated: boolean; fetch: Promiseany>; instantiate: Promiseany>; isAsync: boolean; key: string; linkError: any; linkSucceeded: boolean; module: { dependenciesMap: typeof
Loader['registry'] }; satisfy: Promiseany>; state: number; then: any }>; resolve: (specifier: string, referrer: string) => string }
Low-level JavaScriptCore API for accessing the native ES Module loader (not a Bun API)
Before using this, be aware of a few things:
Using this incorrectly will crash your application.
This API may change any time JavaScriptCore is updated.
Bun may rewrite ESM import specifiers to point to bundled code. This will be confusing when using this API, as it will return a string like "/node_modules.server.bun".
Bun may inject additional imports into your code. This usually has a bun: prefix.
Resources
ReferenceDocsGuidesDiscordMerch StoreGitHubBlog Toolkit
RuntimePackage managerTest runnerBundlerPackage runnerProject
Bun 1.0Bun 1.1Bun 1.2Bun 1.3RoadmapContributingLicenseBaked with ❤️ in San Francisco
We're hiring →