1 | {
|
2 | "title": "HTML Loader options",
|
3 | "type": "object",
|
4 | "definitions": {
|
5 | "Source": {
|
6 | "anyOf": [
|
7 | {
|
8 | "type": "object",
|
9 | "properties": {
|
10 | "tag": {
|
11 | "type": "string",
|
12 | "minLength": 1
|
13 | },
|
14 | "attribute": {
|
15 | "type": "string",
|
16 | "minLength": 1
|
17 | },
|
18 | "type": {
|
19 | "enum": ["src", "srcset"]
|
20 | },
|
21 | "filter": {
|
22 | "instanceof": "Function"
|
23 | }
|
24 | },
|
25 | "required": ["attribute", "type"],
|
26 | "additionalProperties": false
|
27 | },
|
28 | {
|
29 | "enum": ["..."]
|
30 | }
|
31 | ]
|
32 | },
|
33 | "SourcesList": {
|
34 | "type": "array",
|
35 | "items": {
|
36 | "$ref": "#/definitions/Source"
|
37 | },
|
38 | "minItems": 1,
|
39 | "uniqueItems": true
|
40 | }
|
41 | },
|
42 | "properties": {
|
43 | "preprocessor": {
|
44 | "instanceof": "Function",
|
45 | "description": "Allows pre-processing of content before handling.",
|
46 | "link": "https://github.com/webpack-contrib/html-loader#preprocessor"
|
47 | },
|
48 | "sources": {
|
49 | "anyOf": [
|
50 | { "type": "boolean" },
|
51 | {
|
52 | "type": "object",
|
53 | "properties": {
|
54 | "list": {
|
55 | "$ref": "#/definitions/SourcesList"
|
56 | },
|
57 | "urlFilter": {
|
58 | "instanceof": "Function"
|
59 | },
|
60 | "scriptingEnabled": {
|
61 | "type": "boolean"
|
62 | }
|
63 | },
|
64 | "additionalProperties": false
|
65 | }
|
66 | ],
|
67 | "description": "By default every loadable attributes (for example - <img src='image.png'>) is imported (const img = require('./image.png'). You may need to specify loaders for images in your configuration.",
|
68 | "link": "https://github.com/webpack-contrib/html-loader#sources"
|
69 | },
|
70 | "minimize": {
|
71 | "anyOf": [{ "type": "boolean" }, { "type": "object" }],
|
72 | "description": "Tell html-loader to minimize HTML.",
|
73 | "link": "https://github.com/webpack-contrib/html-loader#minimize"
|
74 | },
|
75 | "esModule": {
|
76 | "type": "boolean",
|
77 | "description": "Enable or disable ES modules syntax.",
|
78 | "link": "https://github.com/webpack-contrib/html-loader#esmodule"
|
79 | }
|
80 | },
|
81 | "additionalProperties": false
|
82 | }
|