温馨提示:本站仅提供公开网络链接索引服务,不存储、不篡改任何第三方内容,所有内容版权归原作者所有
AI智能索引来源:http://www.bun.com/reference/bun/BuildConfig/metafile
点击访问原文链接

property metafile | Bun module | Bun

property metafile | Bun module | BunBuildDocsReferenceGuidesBlogDiscord/Bun/BuildConfig/metafilePmetafile

Search the reference...

/

BuildDocsReferenceGuidesBlogDiscord/Bun/BuildConfig/metafilePmetafile

property

BuildConfig.metafilemetafile?: boolean

Generate a JSON file containing metadata about the build.

The metafile contains information about inputs, outputs, imports, and exports which can be used for bundle analysis, visualization, or integration with other tools.

When true, the metafile JSON string is included in the BuildOutput.metafile property.

const result = await Bun.build({
entrypoints: ['./src/index.ts'],
outdir: './dist',
metafile: true,
});

// Write metafile to disk for analysis
if (result.metafile) {
await Bun.write('./dist/meta.json', result.metafile);
}

// Parse and analyze the metafile
const meta = JSON.parse(result.metafile!);
console.log('Input files:', Object.keys(meta.inputs));
console.log('Output files:', Object.keys(meta.outputs));

Resources

ReferenceDocsGuidesDiscordMerch StoreGitHubBlog 

Toolkit

RuntimePackage managerTest runnerBundlerPackage runner

Project

Bun 1.0Bun 1.1Bun 1.2Bun 1.3RoadmapContributingLicense

Baked with ❤️ in San Francisco

We're hiring →

property metafile | Bun module | Bun,AI智能索引,全网链接索引,智能导航,网页索引

    Generate a JSON file containing metadata about the build. The metafile contains information about inputs, outputs, imports, and exports which can be used for bundle analysis, visualization, or integration with other tools. When `true`, the metafile JSON string is included in the BuildOutput.metafile property.