options.json 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242
  1. {
  2. "title": "Dev Server options",
  3. "type": "object",
  4. "definitions": {
  5. "AllowedHosts": {
  6. "anyOf": [
  7. {
  8. "type": "array",
  9. "minItems": 1,
  10. "items": {
  11. "$ref": "#/definitions/AllowedHostsItem"
  12. }
  13. },
  14. {
  15. "enum": ["auto", "all"]
  16. },
  17. {
  18. "$ref": "#/definitions/AllowedHostsItem"
  19. }
  20. ],
  21. "description": "Allows to enumerate the hosts from which access to the dev server are allowed (useful when you are proxying dev server, by default is 'auto').",
  22. "link": "https://webpack.js.org/configuration/dev-server/#devserverallowedhosts"
  23. },
  24. "AllowedHostsItem": {
  25. "type": "string",
  26. "minLength": 1
  27. },
  28. "Bonjour": {
  29. "anyOf": [
  30. {
  31. "type": "boolean",
  32. "cli": {
  33. "negatedDescription": "Disallows to broadcasts dev server via ZeroConf networking on start."
  34. }
  35. },
  36. {
  37. "type": "object",
  38. "description": "Options for bonjour.",
  39. "link": "https://github.com/watson/bonjour#initializing"
  40. }
  41. ],
  42. "description": "Allows to broadcasts dev server via ZeroConf networking on start.",
  43. "link": " https://webpack.js.org/configuration/dev-server/#devserverbonjour"
  44. },
  45. "Client": {
  46. "description": "Allows to specify options for client script in the browser or disable client script.",
  47. "link": "https://webpack.js.org/configuration/dev-server/#devserverclient",
  48. "anyOf": [
  49. {
  50. "enum": [false],
  51. "cli": {
  52. "negatedDescription": "Disables client script."
  53. }
  54. },
  55. {
  56. "type": "object",
  57. "additionalProperties": false,
  58. "properties": {
  59. "logging": {
  60. "$ref": "#/definitions/ClientLogging"
  61. },
  62. "overlay": {
  63. "$ref": "#/definitions/ClientOverlay"
  64. },
  65. "progress": {
  66. "$ref": "#/definitions/ClientProgress"
  67. },
  68. "reconnect": {
  69. "$ref": "#/definitions/ClientReconnect"
  70. },
  71. "webSocketTransport": {
  72. "$ref": "#/definitions/ClientWebSocketTransport"
  73. },
  74. "webSocketURL": {
  75. "$ref": "#/definitions/ClientWebSocketURL"
  76. }
  77. }
  78. }
  79. ]
  80. },
  81. "ClientLogging": {
  82. "enum": ["none", "error", "warn", "info", "log", "verbose"],
  83. "description": "Allows to set log level in the browser.",
  84. "link": "https://webpack.js.org/configuration/dev-server/#logging"
  85. },
  86. "ClientOverlay": {
  87. "anyOf": [
  88. {
  89. "description": "Enables a full-screen overlay in the browser when there are compiler errors or warnings.",
  90. "link": "https://webpack.js.org/configuration/dev-server/#overlay",
  91. "type": "boolean",
  92. "cli": {
  93. "negatedDescription": "Disables the full-screen overlay in the browser when there are compiler errors or warnings."
  94. }
  95. },
  96. {
  97. "type": "object",
  98. "additionalProperties": false,
  99. "properties": {
  100. "errors": {
  101. "description": "Enables a full-screen overlay in the browser when there are compiler errors.",
  102. "type": "boolean",
  103. "cli": {
  104. "negatedDescription": "Disables the full-screen overlay in the browser when there are compiler errors."
  105. }
  106. },
  107. "warnings": {
  108. "description": "Enables a full-screen overlay in the browser when there are compiler warnings.",
  109. "type": "boolean",
  110. "cli": {
  111. "negatedDescription": "Disables the full-screen overlay in the browser when there are compiler warnings."
  112. }
  113. },
  114. "runtimeErrors": {
  115. "description": "Enables a full-screen overlay in the browser when there are uncaught runtime errors.",
  116. "type": "boolean",
  117. "cli": {
  118. "negatedDescription": "Disables the full-screen overlay in the browser when there are uncaught runtime errors."
  119. }
  120. },
  121. "trustedTypesPolicyName": {
  122. "description": "The name of a Trusted Types policy for the overlay. Defaults to 'webpack-dev-server#overlay'.",
  123. "type": "string"
  124. }
  125. }
  126. }
  127. ]
  128. },
  129. "ClientProgress": {
  130. "description": "Prints compilation progress in percentage in the browser.",
  131. "link": "https://webpack.js.org/configuration/dev-server/#progress",
  132. "type": "boolean",
  133. "cli": {
  134. "negatedDescription": "Does not print compilation progress in percentage in the browser."
  135. }
  136. },
  137. "ClientReconnect": {
  138. "description": "Tells dev-server the number of times it should try to reconnect the client.",
  139. "link": "https://webpack.js.org/configuration/dev-server/#reconnect",
  140. "anyOf": [
  141. {
  142. "type": "boolean",
  143. "cli": {
  144. "negatedDescription": "Tells dev-server to not to try to reconnect the client."
  145. }
  146. },
  147. {
  148. "type": "number",
  149. "minimum": 0
  150. }
  151. ]
  152. },
  153. "ClientWebSocketTransport": {
  154. "anyOf": [
  155. {
  156. "$ref": "#/definitions/ClientWebSocketTransportEnum"
  157. },
  158. {
  159. "$ref": "#/definitions/ClientWebSocketTransportString"
  160. }
  161. ],
  162. "description": "Allows to set custom web socket transport to communicate with dev server.",
  163. "link": "https://webpack.js.org/configuration/dev-server/#websockettransport"
  164. },
  165. "ClientWebSocketTransportEnum": {
  166. "enum": ["sockjs", "ws"]
  167. },
  168. "ClientWebSocketTransportString": {
  169. "type": "string",
  170. "minLength": 1
  171. },
  172. "ClientWebSocketURL": {
  173. "description": "Allows to specify URL to web socket server (useful when you're proxying dev server and client script does not always know where to connect to).",
  174. "link": "https://webpack.js.org/configuration/dev-server/#websocketurl",
  175. "anyOf": [
  176. {
  177. "type": "string",
  178. "minLength": 1
  179. },
  180. {
  181. "type": "object",
  182. "additionalProperties": false,
  183. "properties": {
  184. "hostname": {
  185. "description": "Tells clients connected to devServer to use the provided hostname.",
  186. "type": "string",
  187. "minLength": 1
  188. },
  189. "pathname": {
  190. "description": "Tells clients connected to devServer to use the provided path to connect.",
  191. "type": "string"
  192. },
  193. "password": {
  194. "description": "Tells clients connected to devServer to use the provided password to authenticate.",
  195. "type": "string"
  196. },
  197. "port": {
  198. "description": "Tells clients connected to devServer to use the provided port.",
  199. "anyOf": [
  200. {
  201. "type": "number"
  202. },
  203. {
  204. "type": "string",
  205. "minLength": 1
  206. }
  207. ]
  208. },
  209. "protocol": {
  210. "description": "Tells clients connected to devServer to use the provided protocol.",
  211. "anyOf": [
  212. {
  213. "enum": ["auto"]
  214. },
  215. {
  216. "type": "string",
  217. "minLength": 1
  218. }
  219. ]
  220. },
  221. "username": {
  222. "description": "Tells clients connected to devServer to use the provided username to authenticate.",
  223. "type": "string"
  224. }
  225. }
  226. }
  227. ]
  228. },
  229. "Compress": {
  230. "type": "boolean",
  231. "description": "Enables gzip compression for everything served.",
  232. "link": "https://webpack.js.org/configuration/dev-server/#devservercompress",
  233. "cli": {
  234. "negatedDescription": "Disables gzip compression for everything served."
  235. }
  236. },
  237. "DevMiddleware": {
  238. "description": "Provide options to 'webpack-dev-middleware' which handles webpack assets.",
  239. "link": "https://webpack.js.org/configuration/dev-server/#devserverdevmiddleware",
  240. "type": "object",
  241. "additionalProperties": true
  242. },
  243. "HTTP2": {
  244. "type": "boolean",
  245. "description": "Allows to serve over HTTP/2 using SPDY. Deprecated, use the `server` option.",
  246. "link": "https://webpack.js.org/configuration/dev-server/#devserverhttp2",
  247. "cli": {
  248. "negatedDescription": "Does not serve over HTTP/2 using SPDY."
  249. }
  250. },
  251. "HTTPS": {
  252. "anyOf": [
  253. {
  254. "type": "boolean",
  255. "cli": {
  256. "negatedDescription": "Disallows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP)."
  257. }
  258. },
  259. {
  260. "type": "object",
  261. "additionalProperties": true,
  262. "properties": {
  263. "passphrase": {
  264. "type": "string",
  265. "description": "Passphrase for a pfx file. Deprecated, use the `server.options.passphrase` option."
  266. },
  267. "requestCert": {
  268. "type": "boolean",
  269. "description": "Request for an SSL certificate. Deprecated, use the `server.options.requestCert` option.",
  270. "cli": {
  271. "negatedDescription": "Does not request for an SSL certificate."
  272. }
  273. },
  274. "ca": {
  275. "anyOf": [
  276. {
  277. "type": "array",
  278. "items": {
  279. "anyOf": [
  280. {
  281. "type": "string"
  282. },
  283. {
  284. "instanceof": "Buffer"
  285. }
  286. ]
  287. }
  288. },
  289. {
  290. "type": "string"
  291. },
  292. {
  293. "instanceof": "Buffer"
  294. }
  295. ],
  296. "description": "Path to an SSL CA certificate or content of an SSL CA certificate. Deprecated, use the `server.options.ca` option."
  297. },
  298. "cacert": {
  299. "anyOf": [
  300. {
  301. "type": "array",
  302. "items": {
  303. "anyOf": [
  304. {
  305. "type": "string"
  306. },
  307. {
  308. "instanceof": "Buffer"
  309. }
  310. ]
  311. }
  312. },
  313. {
  314. "type": "string"
  315. },
  316. {
  317. "instanceof": "Buffer"
  318. }
  319. ],
  320. "description": "Path to an SSL CA certificate or content of an SSL CA certificate. Deprecated, use the `server.options.ca` option."
  321. },
  322. "cert": {
  323. "anyOf": [
  324. {
  325. "type": "array",
  326. "items": {
  327. "anyOf": [
  328. {
  329. "type": "string"
  330. },
  331. {
  332. "instanceof": "Buffer"
  333. }
  334. ]
  335. }
  336. },
  337. {
  338. "type": "string"
  339. },
  340. {
  341. "instanceof": "Buffer"
  342. }
  343. ],
  344. "description": "Path to an SSL certificate or content of an SSL certificate. Deprecated, use the `server.options.cert` option."
  345. },
  346. "crl": {
  347. "anyOf": [
  348. {
  349. "type": "array",
  350. "items": {
  351. "anyOf": [
  352. {
  353. "type": "string"
  354. },
  355. {
  356. "instanceof": "Buffer"
  357. }
  358. ]
  359. }
  360. },
  361. {
  362. "type": "string"
  363. },
  364. {
  365. "instanceof": "Buffer"
  366. }
  367. ],
  368. "description": "Path to PEM formatted CRLs (Certificate Revocation Lists) or content of PEM formatted CRLs (Certificate Revocation Lists). Deprecated, use the `server.options.crl` option."
  369. },
  370. "key": {
  371. "anyOf": [
  372. {
  373. "type": "array",
  374. "items": {
  375. "anyOf": [
  376. {
  377. "type": "string"
  378. },
  379. {
  380. "instanceof": "Buffer"
  381. },
  382. {
  383. "type": "object",
  384. "additionalProperties": true
  385. }
  386. ]
  387. }
  388. },
  389. {
  390. "type": "string"
  391. },
  392. {
  393. "instanceof": "Buffer"
  394. }
  395. ],
  396. "description": "Path to an SSL key or content of an SSL key. Deprecated, use the `server.options.key` option."
  397. },
  398. "pfx": {
  399. "anyOf": [
  400. {
  401. "type": "array",
  402. "items": {
  403. "anyOf": [
  404. {
  405. "type": "string"
  406. },
  407. {
  408. "instanceof": "Buffer"
  409. },
  410. {
  411. "type": "object",
  412. "additionalProperties": true
  413. }
  414. ]
  415. }
  416. },
  417. {
  418. "type": "string"
  419. },
  420. {
  421. "instanceof": "Buffer"
  422. }
  423. ],
  424. "description": "Path to an SSL pfx file or content of an SSL pfx file. Deprecated, use the `server.options.pfx` option."
  425. }
  426. }
  427. }
  428. ],
  429. "description": "Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP). Deprecated, use the `server` option.",
  430. "link": "https://webpack.js.org/configuration/dev-server/#devserverhttps"
  431. },
  432. "HeaderObject": {
  433. "type": "object",
  434. "additionalProperties": false,
  435. "properties": {
  436. "key": {
  437. "description": "key of header.",
  438. "type": "string"
  439. },
  440. "value": {
  441. "description": "value of header.",
  442. "type": "string"
  443. }
  444. },
  445. "cli": {
  446. "exclude": true
  447. }
  448. },
  449. "Headers": {
  450. "anyOf": [
  451. {
  452. "type": "array",
  453. "items": {
  454. "$ref": "#/definitions/HeaderObject"
  455. },
  456. "minItems": 1
  457. },
  458. {
  459. "type": "object"
  460. },
  461. {
  462. "instanceof": "Function"
  463. }
  464. ],
  465. "description": "Allows to set custom headers on response.",
  466. "link": "https://webpack.js.org/configuration/dev-server/#devserverheaders"
  467. },
  468. "HistoryApiFallback": {
  469. "anyOf": [
  470. {
  471. "type": "boolean",
  472. "cli": {
  473. "negatedDescription": "Disallows to proxy requests through a specified index page."
  474. }
  475. },
  476. {
  477. "type": "object",
  478. "description": "Options for `historyApiFallback`.",
  479. "link": "https://github.com/bripkens/connect-history-api-fallback#options"
  480. }
  481. ],
  482. "description": "Allows to proxy requests through a specified index page (by default 'index.html'), useful for Single Page Applications that utilise the HTML5 History API.",
  483. "link": "https://webpack.js.org/configuration/dev-server/#devserverhistoryapifallback"
  484. },
  485. "Host": {
  486. "description": "Allows to specify a hostname to use.",
  487. "link": "https://webpack.js.org/configuration/dev-server/#devserverhost",
  488. "anyOf": [
  489. {
  490. "enum": ["local-ip", "local-ipv4", "local-ipv6"]
  491. },
  492. {
  493. "type": "string",
  494. "minLength": 1
  495. }
  496. ]
  497. },
  498. "Hot": {
  499. "anyOf": [
  500. {
  501. "type": "boolean",
  502. "cli": {
  503. "negatedDescription": "Disables Hot Module Replacement."
  504. }
  505. },
  506. {
  507. "enum": ["only"]
  508. }
  509. ],
  510. "description": "Enables Hot Module Replacement.",
  511. "link": "https://webpack.js.org/configuration/dev-server/#devserverhot"
  512. },
  513. "IPC": {
  514. "anyOf": [
  515. {
  516. "type": "string",
  517. "minLength": 1
  518. },
  519. {
  520. "type": "boolean",
  521. "enum": [true]
  522. }
  523. ],
  524. "description": "Listen to a unix socket.",
  525. "link": "https://webpack.js.org/configuration/dev-server/#devserveripc"
  526. },
  527. "LiveReload": {
  528. "type": "boolean",
  529. "description": "Enables reload/refresh the page(s) when file changes are detected (enabled by default).",
  530. "cli": {
  531. "negatedDescription": "Disables reload/refresh the page(s) when file changes are detected (enabled by default)."
  532. },
  533. "link": "https://webpack.js.org/configuration/dev-server/#devserverlivereload"
  534. },
  535. "MagicHTML": {
  536. "type": "boolean",
  537. "description": "Tells dev-server whether to enable magic HTML routes (routes corresponding to your webpack output, for example '/main' for 'main.js').",
  538. "cli": {
  539. "negatedDescription": "Disables magic HTML routes (routes corresponding to your webpack output, for example '/main' for 'main.js')."
  540. },
  541. "link": "https://webpack.js.org/configuration/dev-server/#devservermagichtml"
  542. },
  543. "OnAfterSetupMiddleware": {
  544. "instanceof": "Function",
  545. "description": "Provides the ability to execute a custom function and apply custom middleware(s) after all other middlewares. Deprecated: please use the 'setupMiddlewares' option.",
  546. "link": "https://webpack.js.org/configuration/dev-server/#devserveronaftersetupmiddleware"
  547. },
  548. "OnBeforeSetupMiddleware": {
  549. "instanceof": "Function",
  550. "description": "Provides the ability to execute a custom function and apply custom middleware(s) prior to all other middlewares. Deprecated: please use the 'setupMiddlewares' option.",
  551. "link": "https://webpack.js.org/configuration/dev-server/#devserveronbeforesetupmiddleware"
  552. },
  553. "OnListening": {
  554. "instanceof": "Function",
  555. "description": "Provides the ability to execute a custom function when dev server starts listening.",
  556. "link": "https://webpack.js.org/configuration/dev-server/#devserveronlistening"
  557. },
  558. "Open": {
  559. "anyOf": [
  560. {
  561. "type": "array",
  562. "items": {
  563. "anyOf": [
  564. {
  565. "$ref": "#/definitions/OpenString"
  566. },
  567. {
  568. "$ref": "#/definitions/OpenObject"
  569. }
  570. ]
  571. }
  572. },
  573. {
  574. "$ref": "#/definitions/OpenBoolean"
  575. },
  576. {
  577. "$ref": "#/definitions/OpenString"
  578. },
  579. {
  580. "$ref": "#/definitions/OpenObject"
  581. }
  582. ],
  583. "description": "Allows to configure dev server to open the browser(s) and page(s) after server had been started (set it to true to open your default browser).",
  584. "link": "https://webpack.js.org/configuration/dev-server/#devserveropen"
  585. },
  586. "OpenBoolean": {
  587. "type": "boolean",
  588. "cli": {
  589. "negatedDescription": "Does not open the default browser."
  590. }
  591. },
  592. "OpenObject": {
  593. "type": "object",
  594. "additionalProperties": false,
  595. "properties": {
  596. "target": {
  597. "anyOf": [
  598. {
  599. "type": "array",
  600. "items": {
  601. "type": "string"
  602. }
  603. },
  604. {
  605. "type": "string"
  606. }
  607. ],
  608. "description": "Opens specified page in browser."
  609. },
  610. "app": {
  611. "anyOf": [
  612. {
  613. "type": "object",
  614. "additionalProperties": false,
  615. "properties": {
  616. "name": {
  617. "anyOf": [
  618. {
  619. "type": "array",
  620. "items": {
  621. "type": "string",
  622. "minLength": 1
  623. },
  624. "minItems": 1
  625. },
  626. {
  627. "type": "string",
  628. "minLength": 1
  629. }
  630. ]
  631. },
  632. "arguments": {
  633. "items": {
  634. "type": "string",
  635. "minLength": 1
  636. }
  637. }
  638. }
  639. },
  640. {
  641. "type": "string",
  642. "minLength": 1,
  643. "description": "Open specified browser.",
  644. "cli": {
  645. "description": "Open specified browser. Deprecated: please use '--open-app-name'."
  646. }
  647. }
  648. ],
  649. "description": "Open specified browser."
  650. }
  651. }
  652. },
  653. "OpenString": {
  654. "type": "string",
  655. "minLength": 1
  656. },
  657. "Port": {
  658. "anyOf": [
  659. {
  660. "type": "number",
  661. "minimum": 0,
  662. "maximum": 65535
  663. },
  664. {
  665. "type": "string",
  666. "minLength": 1
  667. },
  668. {
  669. "enum": ["auto"]
  670. }
  671. ],
  672. "description": "Allows to specify a port to use.",
  673. "link": "https://webpack.js.org/configuration/dev-server/#devserverport"
  674. },
  675. "Proxy": {
  676. "anyOf": [
  677. {
  678. "type": "object"
  679. },
  680. {
  681. "type": "array",
  682. "items": {
  683. "anyOf": [
  684. {
  685. "type": "object"
  686. },
  687. {
  688. "instanceof": "Function"
  689. }
  690. ]
  691. }
  692. }
  693. ],
  694. "description": "Allows to proxy requests, can be useful when you have a separate API backend development server and you want to send API requests on the same domain.",
  695. "link": "https://webpack.js.org/configuration/dev-server/#devserverproxy"
  696. },
  697. "Server": {
  698. "anyOf": [
  699. {
  700. "$ref": "#/definitions/ServerEnum"
  701. },
  702. {
  703. "$ref": "#/definitions/ServerString"
  704. },
  705. {
  706. "$ref": "#/definitions/ServerObject"
  707. }
  708. ],
  709. "link": "https://webpack.js.org/configuration/dev-server/#devserverserver",
  710. "description": "Allows to set server and options (by default 'http')."
  711. },
  712. "ServerType": {
  713. "enum": ["http", "https", "spdy"]
  714. },
  715. "ServerEnum": {
  716. "enum": ["http", "https", "spdy"],
  717. "cli": {
  718. "exclude": true
  719. }
  720. },
  721. "ServerString": {
  722. "type": "string",
  723. "minLength": 1,
  724. "cli": {
  725. "exclude": true
  726. }
  727. },
  728. "ServerObject": {
  729. "type": "object",
  730. "properties": {
  731. "type": {
  732. "anyOf": [
  733. {
  734. "$ref": "#/definitions/ServerType"
  735. },
  736. {
  737. "$ref": "#/definitions/ServerString"
  738. }
  739. ]
  740. },
  741. "options": {
  742. "$ref": "#/definitions/ServerOptions"
  743. }
  744. },
  745. "additionalProperties": false
  746. },
  747. "ServerOptions": {
  748. "type": "object",
  749. "additionalProperties": true,
  750. "properties": {
  751. "passphrase": {
  752. "type": "string",
  753. "description": "Passphrase for a pfx file."
  754. },
  755. "requestCert": {
  756. "type": "boolean",
  757. "description": "Request for an SSL certificate.",
  758. "cli": {
  759. "negatedDescription": "Does not request for an SSL certificate."
  760. }
  761. },
  762. "ca": {
  763. "anyOf": [
  764. {
  765. "type": "array",
  766. "items": {
  767. "anyOf": [
  768. {
  769. "type": "string"
  770. },
  771. {
  772. "instanceof": "Buffer"
  773. }
  774. ]
  775. }
  776. },
  777. {
  778. "type": "string"
  779. },
  780. {
  781. "instanceof": "Buffer"
  782. }
  783. ],
  784. "description": "Path to an SSL CA certificate or content of an SSL CA certificate."
  785. },
  786. "cacert": {
  787. "anyOf": [
  788. {
  789. "type": "array",
  790. "items": {
  791. "anyOf": [
  792. {
  793. "type": "string"
  794. },
  795. {
  796. "instanceof": "Buffer"
  797. }
  798. ]
  799. }
  800. },
  801. {
  802. "type": "string"
  803. },
  804. {
  805. "instanceof": "Buffer"
  806. }
  807. ],
  808. "description": "Path to an SSL CA certificate or content of an SSL CA certificate. Deprecated, use the `server.options.ca` option."
  809. },
  810. "cert": {
  811. "anyOf": [
  812. {
  813. "type": "array",
  814. "items": {
  815. "anyOf": [
  816. {
  817. "type": "string"
  818. },
  819. {
  820. "instanceof": "Buffer"
  821. }
  822. ]
  823. }
  824. },
  825. {
  826. "type": "string"
  827. },
  828. {
  829. "instanceof": "Buffer"
  830. }
  831. ],
  832. "description": "Path to an SSL certificate or content of an SSL certificate."
  833. },
  834. "crl": {
  835. "anyOf": [
  836. {
  837. "type": "array",
  838. "items": {
  839. "anyOf": [
  840. {
  841. "type": "string"
  842. },
  843. {
  844. "instanceof": "Buffer"
  845. }
  846. ]
  847. }
  848. },
  849. {
  850. "type": "string"
  851. },
  852. {
  853. "instanceof": "Buffer"
  854. }
  855. ],
  856. "description": "Path to PEM formatted CRLs (Certificate Revocation Lists) or content of PEM formatted CRLs (Certificate Revocation Lists)."
  857. },
  858. "key": {
  859. "anyOf": [
  860. {
  861. "type": "array",
  862. "items": {
  863. "anyOf": [
  864. {
  865. "type": "string"
  866. },
  867. {
  868. "instanceof": "Buffer"
  869. },
  870. {
  871. "type": "object",
  872. "additionalProperties": true
  873. }
  874. ]
  875. }
  876. },
  877. {
  878. "type": "string"
  879. },
  880. {
  881. "instanceof": "Buffer"
  882. }
  883. ],
  884. "description": "Path to an SSL key or content of an SSL key."
  885. },
  886. "pfx": {
  887. "anyOf": [
  888. {
  889. "type": "array",
  890. "items": {
  891. "anyOf": [
  892. {
  893. "type": "string"
  894. },
  895. {
  896. "instanceof": "Buffer"
  897. },
  898. {
  899. "type": "object",
  900. "additionalProperties": true
  901. }
  902. ]
  903. }
  904. },
  905. {
  906. "type": "string"
  907. },
  908. {
  909. "instanceof": "Buffer"
  910. }
  911. ],
  912. "description": "Path to an SSL pfx file or content of an SSL pfx file."
  913. }
  914. }
  915. },
  916. "SetupExitSignals": {
  917. "type": "boolean",
  918. "description": "Allows to close dev server and exit the process on SIGINT and SIGTERM signals (enabled by default for CLI).",
  919. "link": "https://webpack.js.org/configuration/dev-server/#devserversetupexitsignals",
  920. "cli": {
  921. "exclude": true
  922. }
  923. },
  924. "SetupMiddlewares": {
  925. "instanceof": "Function",
  926. "description": "Provides the ability to execute a custom function and apply custom middleware(s).",
  927. "link": "https://webpack.js.org/configuration/dev-server/#devserversetupmiddlewares"
  928. },
  929. "Static": {
  930. "anyOf": [
  931. {
  932. "type": "array",
  933. "items": {
  934. "anyOf": [
  935. {
  936. "$ref": "#/definitions/StaticString"
  937. },
  938. {
  939. "$ref": "#/definitions/StaticObject"
  940. }
  941. ]
  942. }
  943. },
  944. {
  945. "type": "boolean",
  946. "cli": {
  947. "negatedDescription": "Disallows to configure options for serving static files from directory."
  948. }
  949. },
  950. {
  951. "$ref": "#/definitions/StaticString"
  952. },
  953. {
  954. "$ref": "#/definitions/StaticObject"
  955. }
  956. ],
  957. "description": "Allows to configure options for serving static files from directory (by default 'public' directory).",
  958. "link": "https://webpack.js.org/configuration/dev-server/#devserverstatic"
  959. },
  960. "StaticObject": {
  961. "type": "object",
  962. "additionalProperties": false,
  963. "properties": {
  964. "directory": {
  965. "type": "string",
  966. "minLength": 1,
  967. "description": "Directory for static contents.",
  968. "link": "https://webpack.js.org/configuration/dev-server/#directory"
  969. },
  970. "staticOptions": {
  971. "type": "object",
  972. "link": "https://webpack.js.org/configuration/dev-server/#staticoptions",
  973. "additionalProperties": true
  974. },
  975. "publicPath": {
  976. "anyOf": [
  977. {
  978. "type": "array",
  979. "items": {
  980. "type": "string"
  981. },
  982. "minItems": 1
  983. },
  984. {
  985. "type": "string"
  986. }
  987. ],
  988. "description": "The static files will be available in the browser under this public path.",
  989. "link": "https://webpack.js.org/configuration/dev-server/#publicpath"
  990. },
  991. "serveIndex": {
  992. "anyOf": [
  993. {
  994. "type": "boolean",
  995. "cli": {
  996. "negatedDescription": "Does not tell dev server to use serveIndex middleware."
  997. }
  998. },
  999. {
  1000. "type": "object",
  1001. "additionalProperties": true
  1002. }
  1003. ],
  1004. "description": "Tells dev server to use serveIndex middleware when enabled.",
  1005. "link": "https://webpack.js.org/configuration/dev-server/#serveindex"
  1006. },
  1007. "watch": {
  1008. "anyOf": [
  1009. {
  1010. "type": "boolean",
  1011. "cli": {
  1012. "negatedDescription": "Does not watch for files in static content directory."
  1013. }
  1014. },
  1015. {
  1016. "type": "object",
  1017. "description": "Options for watch.",
  1018. "link": "https://github.com/paulmillr/chokidar#api"
  1019. }
  1020. ],
  1021. "description": "Watches for files in static content directory.",
  1022. "link": "https://webpack.js.org/configuration/dev-server/#watch"
  1023. }
  1024. }
  1025. },
  1026. "StaticString": {
  1027. "type": "string",
  1028. "minLength": 1
  1029. },
  1030. "WatchFiles": {
  1031. "anyOf": [
  1032. {
  1033. "type": "array",
  1034. "items": {
  1035. "anyOf": [
  1036. {
  1037. "$ref": "#/definitions/WatchFilesString"
  1038. },
  1039. {
  1040. "$ref": "#/definitions/WatchFilesObject"
  1041. }
  1042. ]
  1043. }
  1044. },
  1045. {
  1046. "$ref": "#/definitions/WatchFilesString"
  1047. },
  1048. {
  1049. "$ref": "#/definitions/WatchFilesObject"
  1050. }
  1051. ],
  1052. "description": "Allows to configure list of globs/directories/files to watch for file changes.",
  1053. "link": "https://webpack.js.org/configuration/dev-server/#devserverwatchfiles"
  1054. },
  1055. "WatchFilesObject": {
  1056. "cli": {
  1057. "exclude": true
  1058. },
  1059. "type": "object",
  1060. "properties": {
  1061. "paths": {
  1062. "anyOf": [
  1063. {
  1064. "type": "array",
  1065. "items": {
  1066. "type": "string",
  1067. "minLength": 1
  1068. }
  1069. },
  1070. {
  1071. "type": "string",
  1072. "minLength": 1
  1073. }
  1074. ],
  1075. "description": "Path(s) of globs/directories/files to watch for file changes."
  1076. },
  1077. "options": {
  1078. "type": "object",
  1079. "description": "Configure advanced options for watching. See the chokidar documentation for the possible options.",
  1080. "link": "https://github.com/paulmillr/chokidar#api",
  1081. "additionalProperties": true
  1082. }
  1083. },
  1084. "additionalProperties": false
  1085. },
  1086. "WatchFilesString": {
  1087. "type": "string",
  1088. "minLength": 1
  1089. },
  1090. "WebSocketServer": {
  1091. "anyOf": [
  1092. {
  1093. "$ref": "#/definitions/WebSocketServerEnum"
  1094. },
  1095. {
  1096. "$ref": "#/definitions/WebSocketServerString"
  1097. },
  1098. {
  1099. "$ref": "#/definitions/WebSocketServerFunction"
  1100. },
  1101. {
  1102. "$ref": "#/definitions/WebSocketServerObject"
  1103. }
  1104. ],
  1105. "description": "Allows to set web socket server and options (by default 'ws').",
  1106. "link": "https://webpack.js.org/configuration/dev-server/#devserverwebsocketserver"
  1107. },
  1108. "WebSocketServerType": {
  1109. "enum": ["sockjs", "ws"]
  1110. },
  1111. "WebSocketServerEnum": {
  1112. "anyOf": [
  1113. {
  1114. "enum": [false],
  1115. "cli": {
  1116. "negatedDescription": "Disallows to set web socket server and options."
  1117. }
  1118. },
  1119. {
  1120. "$ref": "#/definitions/WebSocketServerType"
  1121. }
  1122. ],
  1123. "cli": {
  1124. "description": "Deprecated: please use '--web-socket-server-type' option."
  1125. }
  1126. },
  1127. "WebSocketServerFunction": {
  1128. "instanceof": "Function"
  1129. },
  1130. "WebSocketServerObject": {
  1131. "type": "object",
  1132. "properties": {
  1133. "type": {
  1134. "anyOf": [
  1135. {
  1136. "$ref": "#/definitions/WebSocketServerType"
  1137. },
  1138. {
  1139. "$ref": "#/definitions/WebSocketServerString"
  1140. },
  1141. {
  1142. "$ref": "#/definitions/WebSocketServerFunction"
  1143. }
  1144. ]
  1145. },
  1146. "options": {
  1147. "type": "object",
  1148. "additionalProperties": true,
  1149. "cli": {
  1150. "exclude": true
  1151. }
  1152. }
  1153. },
  1154. "additionalProperties": false
  1155. },
  1156. "WebSocketServerString": {
  1157. "type": "string",
  1158. "minLength": 1
  1159. }
  1160. },
  1161. "additionalProperties": false,
  1162. "properties": {
  1163. "allowedHosts": {
  1164. "$ref": "#/definitions/AllowedHosts"
  1165. },
  1166. "bonjour": {
  1167. "$ref": "#/definitions/Bonjour"
  1168. },
  1169. "client": {
  1170. "$ref": "#/definitions/Client"
  1171. },
  1172. "compress": {
  1173. "$ref": "#/definitions/Compress"
  1174. },
  1175. "devMiddleware": {
  1176. "$ref": "#/definitions/DevMiddleware"
  1177. },
  1178. "headers": {
  1179. "$ref": "#/definitions/Headers"
  1180. },
  1181. "historyApiFallback": {
  1182. "$ref": "#/definitions/HistoryApiFallback"
  1183. },
  1184. "host": {
  1185. "$ref": "#/definitions/Host"
  1186. },
  1187. "hot": {
  1188. "$ref": "#/definitions/Hot"
  1189. },
  1190. "http2": {
  1191. "$ref": "#/definitions/HTTP2"
  1192. },
  1193. "https": {
  1194. "$ref": "#/definitions/HTTPS"
  1195. },
  1196. "ipc": {
  1197. "$ref": "#/definitions/IPC"
  1198. },
  1199. "liveReload": {
  1200. "$ref": "#/definitions/LiveReload"
  1201. },
  1202. "magicHtml": {
  1203. "$ref": "#/definitions/MagicHTML"
  1204. },
  1205. "onAfterSetupMiddleware": {
  1206. "$ref": "#/definitions/OnAfterSetupMiddleware"
  1207. },
  1208. "onBeforeSetupMiddleware": {
  1209. "$ref": "#/definitions/OnBeforeSetupMiddleware"
  1210. },
  1211. "onListening": {
  1212. "$ref": "#/definitions/OnListening"
  1213. },
  1214. "open": {
  1215. "$ref": "#/definitions/Open"
  1216. },
  1217. "port": {
  1218. "$ref": "#/definitions/Port"
  1219. },
  1220. "proxy": {
  1221. "$ref": "#/definitions/Proxy"
  1222. },
  1223. "server": {
  1224. "$ref": "#/definitions/Server"
  1225. },
  1226. "setupExitSignals": {
  1227. "$ref": "#/definitions/SetupExitSignals"
  1228. },
  1229. "setupMiddlewares": {
  1230. "$ref": "#/definitions/SetupMiddlewares"
  1231. },
  1232. "static": {
  1233. "$ref": "#/definitions/Static"
  1234. },
  1235. "watchFiles": {
  1236. "$ref": "#/definitions/WatchFiles"
  1237. },
  1238. "webSocketServer": {
  1239. "$ref": "#/definitions/WebSocketServer"
  1240. }
  1241. }
  1242. }