UNPKG

expo-atlas

Version:

Inspect bundle contents, on module level, from Metro

25 lines 924 B
import type { ConfigT as MetroConfig } from 'metro-config'; import { MetroGraphSource } from './data/MetroGraphSource'; /** * Iniitalize Expo Atlas to gather statistics from Metro when exporting bundles. * This function adds the required Metro config, and should be used inside the Expo CLI. * * @example ```js * const atlasFromProject = requireFrom(projectRoot, 'expo-atlas/cli'); * const atlas = atlasFromProject?.createExpoAtlasMiddleware(config); * * if (atlas) { * // Register the Atlas middleware, to serve the UI and API. * middleware.use('/_expo/atlas', atlasFromProject.middleware); * * // Register Metro to listen to changes * atlas.registerMetro(metro); * } * ``` */ export declare function createExpoAtlasMiddleware(config: MetroConfig): { source: MetroGraphSource; middleware: import("connect").Server; registerMetro: any; }; //# sourceMappingURL=cli.d.ts.map