@modern-js/module-tools
Version:
Simple, powerful, high-performance modern npm package development solution.
18 lines (17 loc) • 556 B
TypeScript
import type { ICompiler } from '../../types';
export declare const asset: {
name: string;
apply(compiler: ICompiler): void;
};
/**
*
* @param this Compiler
* @param assetPath Absolute path of the asset
* @param rebaseFrom Absolute path of the file which use asset
* @param calledOnLoad called in load hooks
* @returns dataurl or path
*/
export declare function getAssetContents(this: ICompiler, assetPath: string, rebaseFrom: string, calledOnLoad?: boolean): Promise<{
contents: string | Buffer;
loader: "copy" | "jsx" | "text";
}>;