@nx/esbuild
Version:
14 lines • 1.23 kB
TypeScript
import * as esbuild from 'esbuild';
import { ExecutorContext, ProjectGraphProjectNode } from '@nx/devkit';
import { NormalizedEsBuildExecutorOptions } from '../schema';
export declare function buildEsbuildOptions(format: 'cjs' | 'esm', options: NormalizedEsBuildExecutorOptions, context: ExecutorContext): esbuild.BuildOptions;
/**
* When using TS project references we need to map the paths to the referenced projects.
* This is necessary because esbuild does not support project references out of the box.
* @param context ExecutorContext
*/
export declare function createPathsFromTsConfigReferences(context: ExecutorContext): Record<string, string[]>;
export declare function getOutExtension(format: 'cjs' | 'esm', options: Pick<NormalizedEsBuildExecutorOptions, 'userDefinedBuildOptions'>, context?: ExecutorContext): '.cjs' | '.mjs' | '.js';
export declare function getOutfile(format: 'cjs' | 'esm', options: NormalizedEsBuildExecutorOptions, context: ExecutorContext): string;
export declare function getRegisterFileContent(project: ProjectGraphProjectNode, paths: Record<string, string[]>, mainFile: string, outExtension?: string, format?: 'cjs' | 'esm'): string;
//# sourceMappingURL=build-esbuild-options.d.ts.map