options.json 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. {
  2. "type": "object",
  3. "properties": {
  4. "mimeTypes": {
  5. "description": "Allows a user to register custom mime types or extension mappings.",
  6. "link": "https://github.com/webpack/webpack-dev-middleware#mimetypes",
  7. "type": "object"
  8. },
  9. "mimeTypeDefault": {
  10. "description": "Allows a user to register a default mime type when we can't determine the content type.",
  11. "link": "https://github.com/webpack/webpack-dev-middleware#mimetypedefault",
  12. "type": "string"
  13. },
  14. "writeToDisk": {
  15. "description": "Allows to write generated files on disk.",
  16. "link": "https://github.com/webpack/webpack-dev-middleware#writetodisk",
  17. "anyOf": [
  18. {
  19. "type": "boolean"
  20. },
  21. {
  22. "instanceof": "Function"
  23. }
  24. ]
  25. },
  26. "methods": {
  27. "description": "Allows to pass the list of HTTP request methods accepted by the middleware.",
  28. "link": "https://github.com/webpack/webpack-dev-middleware#methods",
  29. "type": "array",
  30. "items": {
  31. "type": "string",
  32. "minLength": 1
  33. }
  34. },
  35. "headers": {
  36. "anyOf": [
  37. {
  38. "type": "array",
  39. "items": {
  40. "type": "object",
  41. "additionalProperties": false,
  42. "properties": {
  43. "key": {
  44. "description": "key of header.",
  45. "type": "string"
  46. },
  47. "value": {
  48. "description": "value of header.",
  49. "type": "string"
  50. }
  51. }
  52. },
  53. "minItems": 1
  54. },
  55. {
  56. "type": "object"
  57. },
  58. {
  59. "instanceof": "Function"
  60. }
  61. ],
  62. "description": "Allows to pass custom HTTP headers on each request",
  63. "link": "https://github.com/webpack/webpack-dev-middleware#headers"
  64. },
  65. "publicPath": {
  66. "description": "The `publicPath` specifies the public URL address of the output files when referenced in a browser.",
  67. "link": "https://github.com/webpack/webpack-dev-middleware#publicpath",
  68. "anyOf": [
  69. {
  70. "enum": ["auto"]
  71. },
  72. {
  73. "type": "string"
  74. },
  75. {
  76. "instanceof": "Function"
  77. }
  78. ]
  79. },
  80. "stats": {
  81. "description": "Stats options object or preset name.",
  82. "link": "https://github.com/webpack/webpack-dev-middleware#stats",
  83. "anyOf": [
  84. {
  85. "enum": [
  86. "none",
  87. "summary",
  88. "errors-only",
  89. "errors-warnings",
  90. "minimal",
  91. "normal",
  92. "detailed",
  93. "verbose"
  94. ]
  95. },
  96. {
  97. "type": "boolean"
  98. },
  99. {
  100. "type": "object",
  101. "additionalProperties": true
  102. }
  103. ]
  104. },
  105. "serverSideRender": {
  106. "description": "Instructs the module to enable or disable the server-side rendering mode.",
  107. "link": "https://github.com/webpack/webpack-dev-middleware#serversiderender",
  108. "type": "boolean"
  109. },
  110. "outputFileSystem": {
  111. "description": "Set the default file system which will be used by webpack as primary destination of generated files.",
  112. "link": "https://github.com/webpack/webpack-dev-middleware#outputfilesystem",
  113. "type": "object"
  114. },
  115. "index": {
  116. "description": "Allows to serve an index of the directory.",
  117. "link": "https://github.com/webpack/webpack-dev-middleware#index",
  118. "anyOf": [
  119. {
  120. "type": "boolean"
  121. },
  122. {
  123. "type": "string",
  124. "minLength": 1
  125. }
  126. ]
  127. },
  128. "modifyResponseData": {
  129. "description": "Allows to set up a callback to change the response data.",
  130. "link": "https://github.com/webpack/webpack-dev-middleware#modifyresponsedata",
  131. "instanceof": "Function"
  132. },
  133. "etag": {
  134. "description": "Enable or disable etag generation.",
  135. "link": "https://github.com/webpack/webpack-dev-middleware#etag",
  136. "enum": ["weak", "strong"]
  137. },
  138. "lastModified": {
  139. "description": "Enable or disable `Last-Modified` header. Uses the file system's last modified value.",
  140. "link": "https://github.com/webpack/webpack-dev-middleware#lastmodified",
  141. "type": "boolean"
  142. },
  143. "cacheControl": {
  144. "description": "Enable or disable setting `Cache-Control` response header.",
  145. "link": "https://github.com/webpack/webpack-dev-middleware#cachecontrol",
  146. "anyOf": [
  147. {
  148. "type": "boolean"
  149. },
  150. {
  151. "type": "number"
  152. },
  153. {
  154. "type": "string",
  155. "minLength": 1
  156. },
  157. {
  158. "type": "object",
  159. "properties": {
  160. "maxAge": {
  161. "type": "number"
  162. },
  163. "immutable": {
  164. "type": "boolean"
  165. }
  166. },
  167. "additionalProperties": false
  168. }
  169. ]
  170. },
  171. "cacheImmutable": {
  172. "description": "Enable or disable setting `Cache-Control: public, max-age=31536000, immutable` response header for immutable assets (i.e. asset with a hash in file name like `image.a4c12bde.jpg`).",
  173. "link": "https://github.com/webpack/webpack-dev-middleware#cacheimmutable",
  174. "type": "boolean"
  175. }
  176. },
  177. "additionalProperties": false
  178. }