import type { AstroConfig } from '../@types/astro';
import type { ErrorPayload } from 'vite';
/** Normalize URL to its canonical form */
export declare function canonicalURL(url: string, base?: string): URL;
/** is a specifier an npm package? */
export declare function parseNpmName(spec: string): {
    scope?: string;
    name: string;
    subpath?: string;
} | undefined;
/** generate code frame from esbuild error */
export declare function codeFrame(src: string, loc: ErrorPayload['err']['loc']): string;
export declare function resolveDependency(dep: string, astroConfig: AstroConfig): string;
/**
 * Vite-ify URL
 * Given a file URL, return an ID that matches Vite’s module graph. Needed for resolution and stack trace fixing.
 * Must match the following format:
 * Linux/Mac:  /Users/astro/code/my-project/src/pages/index.astro
 * Windows:    C:/Users/astro/code/my-project/src/pages/index.astro
 */
export declare function viteifyURL(filePath: URL): string;
