webpack/schemas/plugins/AssetModulesPlugin.json

51 lines
1.3 KiB
JSON

{
"definitions": {
"DataUrlFn": {
"description": "Function that executes for module source abd resource and should return new module source",
"instanceof": "Function",
"tsType": "((source: string|Buffer, resourcePath: string) => string|Buffer|null)"
},
"DataUrlOptions": {
"type": "object",
"additionalProperties": false,
"properties": {
"enabled": {
"description": "Is data url encoding enabled (true by default)",
"type": "boolean"
},
"encoding": {
"description": "Module output encoding",
"enum": [false, "base64"]
},
"maxSize": {
"description": "Maximum size of files that should be inline as modules. Default: 8kb",
"type": "number"
},
"mimetype": {
"description": "Module output mimetype (getting from file ext by default)",
"type": "string"
}
}
}
},
"title": "AssetModulesPluginOptions",
"type": "object",
"additionalProperties": false,
"properties": {
"dataUrl": {
"description": "The options for data url generator",
"oneOf": [
{
"enum": [false]
},
{
"$ref": "#/definitions/DataUrlOptions"
},
{
"$ref": "#/definitions/DataUrlFn"
}
]
}
}
}