sb-mig
Version:
CLI to rule the world. (and handle stuff related to Storyblok CMS)
17 lines (16 loc) • 469 B
TypeScript
/**
* Package loading utilities
* ESM-compatible require wrapper for loading JSON/JS files dynamically
*/
/**
* Load a package/module from the given path using require
* Works in ESM context by using createRequire
*
* @param path - Path to the package/module to load
* @returns The loaded module content
*
* @example
* const packageJson = pkg('./package.json');
* const config = pkg('some-config-file');
*/
export declare const pkg: (path: string) => any;