UNPKG

@speedy-js/config-loader

Version:

An out-of-box config loader with TypeScript support.

32 lines 923 B
import { Plugin, BuildOptions } from 'esbuild'; export interface Options { /** * The filepath to bundle and require */ filepath: string; /** * The `require` function that is used to load the output file * Default to the global `require` function * This function can be asynchronous, i.e. returns a Promise */ require?: (outfile: string) => any; /** * esbuild options */ esbuildOptions?: BuildOptions; /** * esbuild plugin */ esbuildPlugins?: Plugin[]; /** * Get the path to the output file * By default we simply replace the extension with `.bundled.cjs` */ getOutputFile?: (filepath: string) => string; /** * Whether the keep the temporary file. */ preserveTemporaryFile?: boolean; } export declare function bundleRequire(options: Options): Promise<any>; //# sourceMappingURL=bundle-require.d.ts.map