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 whenever asset should be inlined as DataUrl
|
|
|
|
*/
|
|
|
|
export type DataUrlFunction = (
|
|
|
|
source: string | Buffer,
|
|
|
|
context: {filename: string; module: import("../../lib/Module")}
|
|
|
|
) => boolean;
|
|
|
|
|
|
|
|
export interface AssetModulesPluginParserOptions {
|
|
|
|
/**
|
|
|
|
* The condition for inlining the asset as DataUrl
|
|
|
|
*/
|
|
|
|
dataUrlCondition?: DataUrlOptions | DataUrlFunction;
|
|
|
|
}
|
|
|
|
/**
|
2020-02-17 19:14:51 +08:00
|
|
|
* Options object for DataUrl condition
|
2019-11-26 20:56:27 +08:00
|
|
|
*/
|
|
|
|
export interface DataUrlOptions {
|
|
|
|
/**
|
|
|
|
* Maximum size of asset that should be inline as modules. Default: 8kb
|
|
|
|
*/
|
|
|
|
maxSize?: number;
|
|
|
|
}
|