UNPKG

@harves/nx-node-esm-plugin

Version:

Node executor including ESM module resolution for buildable libraries within Nx workspaces.

20 lines (19 loc) 707 B
/** * Check whether file exists. * @param pth * @returns `true` if the pth exists and is an ordinary file */ export declare function fileExists(pth: string): boolean; /** * Resolves the file to run for the specified `package.json` based * library/application. * * Attempts resolution via the `exports` entry (using `resolve-pkg-maps`) * and then via Node's legacy CommonJS resolution using the `main` field. * * @param outputPath the Nx project output path as a absolute path, usually in the `dist/` folder * @returns the absolute path of the file to run * * @see libs/node-runner/src/lib/node-loader.ts */ export declare function resolveFileToRunFromPackageJson(outputPath: string): string;