UNPKG

@aliretail/vite-config-xixi

Version:

瓴羊客服vite配置脚手架

17 lines (16 loc) 996 B
/// <reference types="node" /> import { promises as fs } from 'fs'; import { Stream } from 'stream'; import { ConfigEnv, UserConfig, UserConfigExport, UserConfigFn } from 'vite'; import * as readPkg from 'read-pkg'; export declare const readFile: typeof fs.readFile; export declare const queryRE: RegExp; export declare const hashRE: RegExp; export declare const cleanUrl: (url: string) => string; export declare function streamToString(stream: Stream): Promise<string>; export declare type Interceptor = (config: UserConfig, env: ConfigEnv) => UserConfig | Promise<UserConfig> | undefined; export declare function tapConfig(config: UserConfigExport, interceptor: Interceptor): UserConfigFn; export declare function mergeConfig(a: UserConfig, b: UserConfig): Record<string, any>; export declare function readPackage(): Promise<readPkg.NormalizedPackageJson>; export declare function readPackageSync(): readPkg.NormalizedPackageJson; export declare function getShortPkgName(name: string): string;