UNPKG

646 BTypeScriptView Raw
1/// <reference types="node" />
2import fs from 'fs';
3import { SnowpackConfig } from '../types';
4/** Perform a file disk lookup for the requested import specifier. */
5export declare function getFsStat(importedFileOnDisk: string): fs.Stats | false;
6/**
7 * Create a import resolver function, which converts any import relative to the given file at "fileLoc"
8 * to a proper URL. Returns false if no matching import was found, which usually indicates a package
9 * not found in the import map.
10 */
11export declare function createImportResolver({ fileLoc, config }: {
12 fileLoc: string;
13 config: SnowpackConfig;
14}): (spec: string) => string | false;