import { Plugin } from '../plugin';
import { ViteDevServer } from '..';
import { PartialResolvedId } from 'rollup';
interface ResolveOptions {
    root: string;
    isBuild: boolean;
    /**
     * src code mode also attempts the following:
     * - resolving /xxx as URLs
     * - resolving bare imports from optimized deps
     */
    asSrc: boolean;
    dedupe?: string[];
}
export declare function resolvePlugin({ root, isBuild, asSrc, dedupe }: ResolveOptions): Plugin;
export declare function tryNodeResolve(id: string, basedir: string, isBuild?: boolean, dedupe?: string[], dedupeRoot?: string, server?: ViteDevServer): PartialResolvedId | undefined;
export interface PackageData {
    dir: string;
    hasSideEffects: (id: string) => boolean;
    data: {
        [field: string]: any;
        version: string;
        main: string;
        module: string;
        browser: string | Record<string, string>;
        exports: string | Record<string, any> | string[];
        dependencies: Record<string, string>;
    };
}
export declare function resolvePackageData(id: string, basedir: string): PackageData | undefined;
export declare function resolvePackageEntry(id: string, { dir, data }: PackageData): string | undefined;
export {};
