options.json 29 KB

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