options.json 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  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. "oneOf": [
  43. {
  44. "$ref": "#/definitions/Rules"
  45. }
  46. ]
  47. },
  48. "include": {
  49. "description": "Include all modules matching any of these conditions.",
  50. "oneOf": [
  51. {
  52. "$ref": "#/definitions/Rules"
  53. }
  54. ]
  55. },
  56. "exclude": {
  57. "description": "Exclude all modules matching any of these conditions.",
  58. "oneOf": [
  59. {
  60. "$ref": "#/definitions/Rules"
  61. }
  62. ]
  63. },
  64. "cache": {
  65. "description": "Enable file caching. Ignored in webpack 5, for webpack 5 please use https://webpack.js.org/configuration/other-options/#cache.",
  66. "anyOf": [
  67. {
  68. "type": "boolean"
  69. },
  70. {
  71. "type": "string"
  72. }
  73. ]
  74. },
  75. "cacheKeys": {
  76. "description": "Allows you to override default cache keys. Ignored in webpack 5, for webpack 5 please use https://webpack.js.org/configuration/other-options/#cache.",
  77. "instanceof": "Function"
  78. },
  79. "parallel": {
  80. "description": "Use multi-process parallel running to improve the build speed.",
  81. "anyOf": [
  82. {
  83. "type": "boolean"
  84. },
  85. {
  86. "type": "integer"
  87. }
  88. ]
  89. },
  90. "sourceMap": {
  91. "description": "Enables/Disables generation of source maps.",
  92. "type": "boolean"
  93. },
  94. "minify": {
  95. "description": "Allows you to override default minify function.",
  96. "instanceof": "Function"
  97. },
  98. "terserOptions": {
  99. "description": "Options for `terser`.",
  100. "additionalProperties": true,
  101. "type": "object"
  102. },
  103. "extractComments": {
  104. "description": "Whether comments shall be extracted to a separate file.",
  105. "anyOf": [
  106. {
  107. "type": "boolean"
  108. },
  109. {
  110. "type": "string"
  111. },
  112. {
  113. "instanceof": "RegExp"
  114. },
  115. {
  116. "instanceof": "Function"
  117. },
  118. {
  119. "additionalProperties": false,
  120. "properties": {
  121. "condition": {
  122. "anyOf": [
  123. {
  124. "type": "boolean"
  125. },
  126. {
  127. "type": "string"
  128. },
  129. {
  130. "instanceof": "RegExp"
  131. },
  132. {
  133. "instanceof": "Function"
  134. }
  135. ]
  136. },
  137. "filename": {
  138. "anyOf": [
  139. {
  140. "type": "string"
  141. },
  142. {
  143. "instanceof": "Function"
  144. }
  145. ]
  146. },
  147. "banner": {
  148. "anyOf": [
  149. {
  150. "type": "boolean"
  151. },
  152. {
  153. "type": "string"
  154. },
  155. {
  156. "instanceof": "Function"
  157. }
  158. ]
  159. }
  160. },
  161. "type": "object"
  162. }
  163. ]
  164. }
  165. }
  166. }