esbuild-fix-imports-plugin
Version:
An ESBuild plugin that fixes import paths by applying fixAliasPlugin, fixFolderImportsPlugin, and fixExtensionsPlugin. It ensures correct file extensions, resolves path aliases, and fixes directory imports in your build output when using 'tsup' with 'bund
17 lines • 730 B
TypeScript
import { type Plugin } from "esbuild";
/**
* ESBuild plugin to forcefully replace path aliases with relative paths in the output files.
* It reads the alias configuration from tsconfig.json and modifies the output files to resolve the aliases.
* Also handles baseUrl-based imports when no explicit path aliases are configured.
*
* @returns {import('esbuild').Plugin} An ESBuild plugin object.
*/
export declare const fixAliasPlugin: () => Plugin;
/**
* Gets the path without the file extension.
*
* @param {string} path - The path to process.
* @returns {string} The path without the file extension.
*/
export declare const getPathWithoutExtension: (path: string) => string;
//# sourceMappingURL=fixAliasPlugin.d.ts.map