1 | {
|
---|
2 | "definitions": {
|
---|
3 | "Rule": {
|
---|
4 | "description": "Filtering rule as regex or string.",
|
---|
5 | "anyOf": [
|
---|
6 | {
|
---|
7 | "instanceof": "RegExp",
|
---|
8 | "tsType": "RegExp"
|
---|
9 | },
|
---|
10 | {
|
---|
11 | "type": "string",
|
---|
12 | "minLength": 1
|
---|
13 | }
|
---|
14 | ]
|
---|
15 | },
|
---|
16 | "Rules": {
|
---|
17 | "description": "Filtering rules.",
|
---|
18 | "anyOf": [
|
---|
19 | {
|
---|
20 | "type": "array",
|
---|
21 | "items": {
|
---|
22 | "description": "A rule condition.",
|
---|
23 | "oneOf": [
|
---|
24 | {
|
---|
25 | "$ref": "#/definitions/Rule"
|
---|
26 | }
|
---|
27 | ]
|
---|
28 | }
|
---|
29 | },
|
---|
30 | {
|
---|
31 | "$ref": "#/definitions/Rule"
|
---|
32 | }
|
---|
33 | ]
|
---|
34 | }
|
---|
35 | },
|
---|
36 | "title": "TerserPluginOptions",
|
---|
37 | "type": "object",
|
---|
38 | "additionalProperties": false,
|
---|
39 | "properties": {
|
---|
40 | "test": {
|
---|
41 | "description": "Include all modules that pass test assertion.",
|
---|
42 | "link": "https://github.com/webpack-contrib/terser-webpack-plugin#test",
|
---|
43 | "oneOf": [
|
---|
44 | {
|
---|
45 | "$ref": "#/definitions/Rules"
|
---|
46 | }
|
---|
47 | ]
|
---|
48 | },
|
---|
49 | "include": {
|
---|
50 | "description": "Include all modules matching any of these conditions.",
|
---|
51 | "link": "https://github.com/webpack-contrib/terser-webpack-plugin#include",
|
---|
52 | "oneOf": [
|
---|
53 | {
|
---|
54 | "$ref": "#/definitions/Rules"
|
---|
55 | }
|
---|
56 | ]
|
---|
57 | },
|
---|
58 | "exclude": {
|
---|
59 | "description": "Exclude all modules matching any of these conditions.",
|
---|
60 | "link": "https://github.com/webpack-contrib/terser-webpack-plugin#exclude",
|
---|
61 | "oneOf": [
|
---|
62 | {
|
---|
63 | "$ref": "#/definitions/Rules"
|
---|
64 | }
|
---|
65 | ]
|
---|
66 | },
|
---|
67 | "terserOptions": {
|
---|
68 | "description": "Options for `terser` (by default) or custom `minify` function.",
|
---|
69 | "link": "https://github.com/webpack-contrib/terser-webpack-plugin#terseroptions",
|
---|
70 | "additionalProperties": true,
|
---|
71 | "type": "object"
|
---|
72 | },
|
---|
73 | "extractComments": {
|
---|
74 | "description": "Whether comments shall be extracted to a separate file.",
|
---|
75 | "link": "https://github.com/webpack-contrib/terser-webpack-plugin#extractcomments",
|
---|
76 | "anyOf": [
|
---|
77 | {
|
---|
78 | "type": "boolean"
|
---|
79 | },
|
---|
80 | {
|
---|
81 | "type": "string",
|
---|
82 | "minLength": 1
|
---|
83 | },
|
---|
84 | {
|
---|
85 | "instanceof": "RegExp"
|
---|
86 | },
|
---|
87 | {
|
---|
88 | "instanceof": "Function"
|
---|
89 | },
|
---|
90 | {
|
---|
91 | "additionalProperties": false,
|
---|
92 | "properties": {
|
---|
93 | "condition": {
|
---|
94 | "anyOf": [
|
---|
95 | {
|
---|
96 | "type": "boolean"
|
---|
97 | },
|
---|
98 | {
|
---|
99 | "type": "string",
|
---|
100 | "minLength": 1
|
---|
101 | },
|
---|
102 | {
|
---|
103 | "instanceof": "RegExp"
|
---|
104 | },
|
---|
105 | {
|
---|
106 | "instanceof": "Function"
|
---|
107 | }
|
---|
108 | ],
|
---|
109 | "description": "Condition what comments you need extract.",
|
---|
110 | "link": "https://github.com/webpack-contrib/terser-webpack-plugin#condition"
|
---|
111 | },
|
---|
112 | "filename": {
|
---|
113 | "anyOf": [
|
---|
114 | {
|
---|
115 | "type": "string",
|
---|
116 | "minLength": 1
|
---|
117 | },
|
---|
118 | {
|
---|
119 | "instanceof": "Function"
|
---|
120 | }
|
---|
121 | ],
|
---|
122 | "description": "The file where the extracted comments will be stored. Default is to append the suffix .LICENSE.txt to the original filename.",
|
---|
123 | "link": "https://github.com/webpack-contrib/terser-webpack-plugin#filename"
|
---|
124 | },
|
---|
125 | "banner": {
|
---|
126 | "anyOf": [
|
---|
127 | {
|
---|
128 | "type": "boolean"
|
---|
129 | },
|
---|
130 | {
|
---|
131 | "type": "string",
|
---|
132 | "minLength": 1
|
---|
133 | },
|
---|
134 | {
|
---|
135 | "instanceof": "Function"
|
---|
136 | }
|
---|
137 | ],
|
---|
138 | "description": "The banner text that points to the extracted file and will be added on top of the original file",
|
---|
139 | "link": "https://github.com/webpack-contrib/terser-webpack-plugin#banner"
|
---|
140 | }
|
---|
141 | },
|
---|
142 | "type": "object"
|
---|
143 | }
|
---|
144 | ]
|
---|
145 | },
|
---|
146 | "parallel": {
|
---|
147 | "description": "Use multi-process parallel running to improve the build speed.",
|
---|
148 | "link": "https://github.com/webpack-contrib/terser-webpack-plugin#parallel",
|
---|
149 | "anyOf": [
|
---|
150 | {
|
---|
151 | "type": "boolean"
|
---|
152 | },
|
---|
153 | {
|
---|
154 | "type": "integer"
|
---|
155 | }
|
---|
156 | ]
|
---|
157 | },
|
---|
158 | "minify": {
|
---|
159 | "description": "Allows you to override default minify function.",
|
---|
160 | "link": "https://github.com/webpack-contrib/terser-webpack-plugin#number",
|
---|
161 | "instanceof": "Function"
|
---|
162 | }
|
---|
163 | }
|
---|
164 | }
|
---|