UNPKG

@visulima/packem

Version:

A fast and modern bundler for Node.js and TypeScript.

26 lines (25 loc) 782 B
import type { Pail } from "@visulima/pail"; import type { TsConfigResult } from "@visulima/tsconfig"; import type { Plugin } from "rollup"; /** * This plugin resolves module paths using the rootDirs configuration from the tsconfig.json file. * * Consider the following example configuration: * @example * ```json * { * "compilerOptions": { * "rootDirs": ["lib"] * } * } * ``` * * This configuration will allow you to import modules from the `src` and `lib` directories. * * ```typescript * import { foo } from "./foo.d.ts"; -> ./src/foo * import { bar } from "./bar.d.ts"; // -> ./lib/bar * ``` */ declare const resolveTsconfigRootDirectories: (cwd: string, logger: Pail, tsconfig: TsConfigResult) => Plugin; export = resolveTsconfigRootDirectories;