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