options.json 29 KB

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