2019-11-26 20:56:27 +08:00
|
|
|
/**
|
|
|
|
* This file was automatically generated.
|
|
|
|
* DO NOT MODIFY BY HAND.
|
|
|
|
* Run `yarn special-lint-fix` to update
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Function that executes for module and should return an DataUrl string
|
|
|
|
*/
|
|
|
|
export type DataUrlFunction = (
|
|
|
|
source: string | Buffer,
|
|
|
|
context: {filename: string; module: import("../../lib/Module")}
|
|
|
|
) => string;
|
|
|
|
|
|
|
|
export interface AssetModulesPluginGeneratorOptions {
|
|
|
|
/**
|
|
|
|
* The options for data url generator
|
|
|
|
*/
|
|
|
|
dataUrl?: DataUrlOptions | DataUrlFunction;
|
2020-01-22 21:19:45 +08:00
|
|
|
/**
|
2020-01-29 21:48:46 +08:00
|
|
|
* Template for asset filename
|
2020-01-22 21:19:45 +08:00
|
|
|
*/
|
2020-01-23 18:27:12 +08:00
|
|
|
filename?:
|
|
|
|
| string
|
|
|
|
| ((
|
|
|
|
pathData: import("../../lib/Compilation").PathData,
|
|
|
|
assetInfo?: import("../../lib/Compilation").AssetInfo
|
|
|
|
) => string);
|
2019-11-26 20:56:27 +08:00
|
|
|
}
|
|
|
|
/**
|
2020-02-17 19:14:51 +08:00
|
|
|
* Options object for data url generation
|
2019-11-26 20:56:27 +08:00
|
|
|
*/
|
|
|
|
export interface DataUrlOptions {
|
|
|
|
/**
|
|
|
|
* Asset encoding (defaults to base64)
|
|
|
|
*/
|
|
|
|
encoding?: false | "base64";
|
|
|
|
/**
|
|
|
|
* Asset mimetype (getting from file extension by default)
|
|
|
|
*/
|
|
|
|
mimetype?: string;
|
|
|
|
}
|