UNPKG

25.6 kBJSONView Raw
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 },
33 {
34 "type": "object",
35 "description": "Options for bonjour.",
36 "link": "https://github.com/watson/bonjour#initializing"
37 }
38 ],
39 "description": "Allows to broadcasts dev server via ZeroConf networking on start.",
40 "link": " https://webpack.js.org/configuration/dev-server/#devserverbonjour"
41 },
42 "Client": {
43 "description": "Allows to specify options for client script in the browser or disable client script.",
44 "link": "https://webpack.js.org/configuration/dev-server/#devserverclient",
45 "anyOf": [
46 {
47 "enum": [false]
48 },
49 {
50 "type": "object",
51 "additionalProperties": false,
52 "properties": {
53 "logging": {
54 "$ref": "#/definitions/ClientLogging"
55 },
56 "overlay": {
57 "$ref": "#/definitions/ClientOverlay"
58 },
59 "progress": {
60 "$ref": "#/definitions/ClientProgress"
61 },
62 "webSocketTransport": {
63 "$ref": "#/definitions/ClientWebSocketTransport"
64 },
65 "webSocketURL": {
66 "$ref": "#/definitions/ClientWebSocketURL"
67 }
68 }
69 }
70 ]
71 },
72 "ClientLogging": {
73 "enum": ["none", "error", "warn", "info", "log", "verbose"],
74 "decription": "Allows to set log level in the browser.",
75 "link": "https://webpack.js.org/configuration/dev-server/#logging"
76 },
77 "ClientOverlay": {
78 "anyOf": [
79 {
80 "description": "Enables a full-screen overlay in the browser when there are compiler errors or warnings.",
81 "link": "https://webpack.js.org/configuration/dev-server/#overlay",
82 "type": "boolean"
83 },
84 {
85 "type": "object",
86 "additionalProperties": false,
87 "properties": {
88 "errors": {
89 "description": "Enables a full-screen overlay in the browser when there are compiler errors.",
90 "type": "boolean"
91 },
92 "warnings": {
93 "description": "Enables a full-screen overlay in the browser when there are compiler warnings.",
94 "type": "boolean"
95 }
96 }
97 }
98 ]
99 },
100 "ClientProgress": {
101 "description": "Prints compilation progress in percentage in the browser.",
102 "link": "https://webpack.js.org/configuration/dev-server/#progress",
103 "type": "boolean"
104 },
105 "ClientWebSocketTransport": {
106 "anyOf": [
107 {
108 "$ref": "#/definitions/ClientWebSocketTransportEnum"
109 },
110 {
111 "$ref": "#/definitions/ClientWebSocketTransportString"
112 }
113 ],
114 "description": "Allows to set custom web socket transport to communicate with dev server.",
115 "link": "https://webpack.js.org/configuration/dev-server/#websockettransport"
116 },
117 "ClientWebSocketTransportEnum": {
118 "enum": ["sockjs", "ws"]
119 },
120 "ClientWebSocketTransportString": {
121 "type": "string",
122 "minLength": 1
123 },
124 "ClientWebSocketURL": {
125 "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).",
126 "link": "https://webpack.js.org/configuration/dev-server/#websocketurl",
127 "anyOf": [
128 {
129 "type": "string",
130 "minLength": 1
131 },
132 {
133 "type": "object",
134 "additionalProperties": false,
135 "properties": {
136 "hostname": {
137 "description": "Tells clients connected to devServer to use the provided hostname.",
138 "type": "string",
139 "minLength": 1
140 },
141 "pathname": {
142 "description": "Tells clients connected to devServer to use the provided path to connect.",
143 "type": "string"
144 },
145 "password": {
146 "description": "Tells clients connected to devServer to use the provided password to authenticate.",
147 "type": "string"
148 },
149 "port": {
150 "description": "Tells clients connected to devServer to use the provided port.",
151 "anyOf": [
152 {
153 "type": "number"
154 },
155 {
156 "type": "string",
157 "minLength": 1
158 }
159 ]
160 },
161 "protocol": {
162 "description": "Tells clients connected to devServer to use the provided protocol.",
163 "anyOf": [
164 {
165 "enum": ["auto"]
166 },
167 {
168 "type": "string",
169 "minLength": 1
170 }
171 ]
172 },
173 "username": {
174 "description": "Tells clients connected to devServer to use the provided username to authenticate.",
175 "type": "string"
176 }
177 }
178 }
179 ]
180 },
181 "Compress": {
182 "type": "boolean",
183 "description": "Enables gzip compression for everything served.",
184 "link": "https://webpack.js.org/configuration/dev-server/#devservercompress"
185 },
186 "DevMiddleware": {
187 "description": "Provide options to 'webpack-dev-middleware' which handles webpack assets.",
188 "link": "https://webpack.js.org/configuration/dev-server/#devserverdevmiddleware",
189 "type": "object",
190 "additionalProperties": true
191 },
192 "HTTP2": {
193 "type": "boolean",
194 "description": "Allows to serve over HTTP/2 using SPDY.",
195 "link": "https://webpack.js.org/configuration/dev-server/#devserverhttp2"
196 },
197 "HTTPS": {
198 "anyOf": [
199 {
200 "type": "boolean"
201 },
202 {
203 "type": "object",
204 "additionalProperties": true,
205 "properties": {
206 "passphrase": {
207 "type": "string",
208 "description": "Passphrase for a pfx file."
209 },
210 "requestCert": {
211 "type": "boolean",
212 "description": "Request for an SSL certificate."
213 },
214 "ca": {
215 "anyOf": [
216 {
217 "type": "array",
218 "items": {
219 "anyOf": [
220 {
221 "type": "string"
222 },
223 {
224 "instanceof": "Buffer"
225 }
226 ]
227 }
228 },
229 {
230 "type": "string"
231 },
232 {
233 "instanceof": "Buffer"
234 }
235 ],
236 "description": "Path to an SSL CA certificate or content of an SSL CA certificate."
237 },
238 "cacert": {
239 "anyOf": [
240 {
241 "type": "array",
242 "items": {
243 "anyOf": [
244 {
245 "type": "string"
246 },
247 {
248 "instanceof": "Buffer"
249 }
250 ]
251 }
252 },
253 {
254 "type": "string"
255 },
256 {
257 "instanceof": "Buffer"
258 }
259 ],
260 "description": "Path to an SSL CA certificate or content of an SSL CA certificate."
261 },
262 "cert": {
263 "anyOf": [
264 {
265 "type": "array",
266 "items": {
267 "anyOf": [
268 {
269 "type": "string"
270 },
271 {
272 "instanceof": "Buffer"
273 }
274 ]
275 }
276 },
277 {
278 "type": "string"
279 },
280 {
281 "instanceof": "Buffer"
282 }
283 ],
284 "description": "Path to an SSL certificate or content of an SSL certificate."
285 },
286 "crl": {
287 "anyOf": [
288 {
289 "type": "array",
290 "items": {
291 "anyOf": [
292 {
293 "type": "string"
294 },
295 {
296 "instanceof": "Buffer"
297 }
298 ]
299 }
300 },
301 {
302 "type": "string"
303 },
304 {
305 "instanceof": "Buffer"
306 }
307 ],
308 "description": "Path to PEM formatted CRLs (Certificate Revocation Lists) or content of PEM formatted CRLs (Certificate Revocation Lists)."
309 },
310 "key": {
311 "anyOf": [
312 {
313 "type": "array",
314 "items": {
315 "anyOf": [
316 {
317 "type": "string"
318 },
319 {
320 "instanceof": "Buffer"
321 },
322 {
323 "type": "object",
324 "additionalProperties": true
325 }
326 ]
327 }
328 },
329 {
330 "type": "string"
331 },
332 {
333 "instanceof": "Buffer"
334 }
335 ],
336 "description": "Path to an SSL key or content of an SSL key."
337 },
338 "pfx": {
339 "anyOf": [
340 {
341 "type": "array",
342 "items": {
343 "anyOf": [
344 {
345 "type": "string"
346 },
347 {
348 "instanceof": "Buffer"
349 },
350 {
351 "type": "object",
352 "additionalProperties": true
353 }
354 ]
355 }
356 },
357 {
358 "type": "string"
359 },
360 {
361 "instanceof": "Buffer"
362 }
363 ],
364 "description": "Path to an SSL pfx file or content of an SSL pfx file."
365 }
366 }
367 }
368 ],
369 "description": "Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP).",
370 "link": "https://webpack.js.org/configuration/dev-server/#devserverhttps"
371 },
372 "Headers": {
373 "anyOf": [
374 {
375 "type": "object"
376 },
377 {
378 "instanceof": "Function"
379 }
380 ],
381 "description": "Allows to set custom headers on response.",
382 "link": "https://webpack.js.org/configuration/dev-server/#devserverheaders"
383 },
384 "HistoryApiFallback": {
385 "anyOf": [
386 {
387 "type": "boolean"
388 },
389 {
390 "type": "object",
391 "description": "Options for `historyApiFallback`.",
392 "link": "https://github.com/bripkens/connect-history-api-fallback#options"
393 }
394 ],
395 "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.",
396 "link": "https://webpack.js.org/configuration/dev-server/#devserverhistoryapifallback"
397 },
398 "Host": {
399 "description": "Allows to specify a hostname to use.",
400 "link": "https://webpack.js.org/configuration/dev-server/#devserverhost",
401 "anyOf": [
402 {
403 "enum": ["local-ip", "local-ipv4", "local-ipv6"]
404 },
405 {
406 "type": "string",
407 "minLength": 1
408 }
409 ]
410 },
411 "Hot": {
412 "anyOf": [
413 {
414 "type": "boolean"
415 },
416 {
417 "enum": ["only"]
418 }
419 ],
420 "description": "Enables Hot Module Replacement.",
421 "link": "https://webpack.js.org/configuration/dev-server/#devserverhot"
422 },
423 "IPC": {
424 "anyOf": [
425 {
426 "type": "string",
427 "minLength": 1
428 },
429 {
430 "type": "boolean",
431 "enum": [true]
432 }
433 ],
434 "description": "Listen to a unix socket.",
435 "link": "https://webpack.js.org/configuration/dev-server/#devserveripc"
436 },
437 "LiveReload": {
438 "type": "boolean",
439 "description": "Enables reload/refresh the page(s) when file changes are detected (enabled by default).",
440 "link": "https://webpack.js.org/configuration/dev-server/#devserverlivereload"
441 },
442 "MagicHTML": {
443 "type": "boolean",
444 "description": "Tells dev-server whether to enable magic HTML routes (routes corresponding to your webpack output, for example '/main' for 'main.js').",
445 "link": "https://webpack.js.org/configuration/dev-server/#devservermagichtml"
446 },
447 "OnAfterSetupMiddleware": {
448 "instanceof": "Function",
449 "description": "Provides the ability to execute a custom function and apply custom middleware(s) after all other middlewares.",
450 "link": "https://webpack.js.org/configuration/dev-server/#devserveronaftersetupmiddleware"
451 },
452 "OnBeforeSetupMiddleware": {
453 "instanceof": "Function",
454 "description": "Provides the ability to execute a custom function and apply custom middleware(s) prior to all other middlewares.",
455 "link": "https://webpack.js.org/configuration/dev-server/#devserveronbeforesetupmiddleware"
456 },
457 "OnListening": {
458 "instanceof": "Function",
459 "description": "Provides the ability to execute a custom function when dev server starts listening.",
460 "link": "https://webpack.js.org/configuration/dev-server/#devserveronlistening"
461 },
462 "Open": {
463 "anyOf": [
464 {
465 "type": "array",
466 "items": {
467 "anyOf": [
468 {
469 "$ref": "#/definitions/OpenString"
470 },
471 {
472 "$ref": "#/definitions/OpenObject"
473 }
474 ]
475 }
476 },
477 {
478 "$ref": "#/definitions/OpenBoolean"
479 },
480 {
481 "$ref": "#/definitions/OpenString"
482 },
483 {
484 "$ref": "#/definitions/OpenObject"
485 }
486 ],
487 "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).",
488 "link": "https://webpack.js.org/configuration/dev-server/#devserveropen"
489 },
490 "OpenBoolean": {
491 "type": "boolean"
492 },
493 "OpenObject": {
494 "type": "object",
495 "additionalProperties": false,
496 "properties": {
497 "target": {
498 "anyOf": [
499 {
500 "type": "array",
501 "items": {
502 "type": "string"
503 }
504 },
505 {
506 "type": "string"
507 }
508 ],
509 "description": "Opens specified page in browser."
510 },
511 "app": {
512 "anyOf": [
513 {
514 "type": "object",
515 "additionalProperties": false,
516 "properties": {
517 "name": {
518 "anyOf": [
519 {
520 "type": "array",
521 "items": {
522 "type": "string",
523 "minLength": 1
524 },
525 "minItems": 1
526 },
527 {
528 "type": "string",
529 "minLength": 1
530 }
531 ]
532 },
533 "arguments": {
534 "items": {
535 "type": "string",
536 "minLength": 1
537 }
538 }
539 }
540 },
541 {
542 "type": "string",
543 "minLength": 1
544 }
545 ],
546 "description": "Open specified browser."
547 }
548 }
549 },
550 "OpenString": {
551 "type": "string",
552 "minLength": 1
553 },
554 "Port": {
555 "anyOf": [
556 {
557 "type": "number"
558 },
559 {
560 "type": "string",
561 "minLength": 1
562 },
563 {
564 "enum": ["auto"]
565 }
566 ],
567 "description": "Allows to specify a port to use.",
568 "link": "https://webpack.js.org/configuration/dev-server/#devserverport"
569 },
570 "Proxy": {
571 "anyOf": [
572 {
573 "type": "object"
574 },
575 {
576 "type": "array",
577 "items": {
578 "anyOf": [
579 {
580 "type": "object"
581 },
582 {
583 "instanceof": "Function"
584 }
585 ]
586 }
587 }
588 ],
589 "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.",
590 "link": "https://webpack.js.org/configuration/dev-server/#devserverproxy"
591 },
592 "SetupExitSignals": {
593 "type": "boolean",
594 "description": "Allows to close dev server and exit the process on SIGINT and SIGTERM signals (enabled by default for CLI).",
595 "link": "https://webpack.js.org/configuration/dev-server/#devserversetupexitsignals",
596 "cli": {
597 "exclude": true
598 }
599 },
600 "Static": {
601 "anyOf": [
602 {
603 "type": "array",
604 "items": {
605 "anyOf": [
606 {
607 "$ref": "#/definitions/StaticString"
608 },
609 {
610 "$ref": "#/definitions/StaticObject"
611 }
612 ]
613 }
614 },
615 {
616 "type": "boolean"
617 },
618 {
619 "$ref": "#/definitions/StaticString"
620 },
621 {
622 "$ref": "#/definitions/StaticObject"
623 }
624 ],
625 "description": "Allows to configure options for serving static files from directory (by default 'public' directory).",
626 "link": "https://webpack.js.org/configuration/dev-server/#devserverstatic"
627 },
628 "StaticObject": {
629 "type": "object",
630 "additionalProperties": false,
631 "properties": {
632 "directory": {
633 "type": "string",
634 "minLength": 1,
635 "description": "Directory for static contents.",
636 "link": "https://webpack.js.org/configuration/dev-server/#directory"
637 },
638 "staticOptions": {
639 "type": "object",
640 "link": "https://webpack.js.org/configuration/dev-server/#staticoptions",
641 "additionalProperties": true
642 },
643 "publicPath": {
644 "anyOf": [
645 {
646 "type": "array",
647 "items": {
648 "type": "string"
649 },
650 "minItems": 1
651 },
652 {
653 "type": "string"
654 }
655 ],
656 "description": "The static files will be available in the browser under this public path.",
657 "link": "https://webpack.js.org/configuration/dev-server/#publicpath"
658 },
659 "serveIndex": {
660 "anyOf": [
661 {
662 "type": "boolean"
663 },
664 {
665 "type": "object",
666 "additionalProperties": true
667 }
668 ],
669 "description": "Tells dev server to use serveIndex middleware when enabled.",
670 "link": "https://webpack.js.org/configuration/dev-server/#serveindex"
671 },
672 "watch": {
673 "anyOf": [
674 {
675 "type": "boolean"
676 },
677 {
678 "type": "object",
679 "description": "Options for watch.",
680 "link": "https://github.com/paulmillr/chokidar#api"
681 }
682 ],
683 "description": "Watches for files in static content directory.",
684 "link": "https://webpack.js.org/configuration/dev-server/#watch"
685 }
686 }
687 },
688 "StaticString": {
689 "type": "string",
690 "minLength": 1
691 },
692 "WatchFiles": {
693 "anyOf": [
694 {
695 "type": "array",
696 "items": {
697 "anyOf": [
698 {
699 "$ref": "#/definitions/WatchFilesString"
700 },
701 {
702 "$ref": "#/definitions/WatchFilesObject"
703 }
704 ]
705 }
706 },
707 {
708 "$ref": "#/definitions/WatchFilesString"
709 },
710 {
711 "$ref": "#/definitions/WatchFilesObject"
712 }
713 ],
714 "description": "Allows to configure list of globs/directories/files to watch for file changes.",
715 "link": "https://webpack.js.org/configuration/dev-server/#devserverwatchfiles"
716 },
717 "WatchFilesObject": {
718 "cli": {
719 "exclude": true
720 },
721 "type": "object",
722 "properties": {
723 "paths": {
724 "anyOf": [
725 {
726 "type": "array",
727 "items": {
728 "type": "string",
729 "minLength": 1
730 }
731 },
732 {
733 "type": "string",
734 "minLength": 1
735 }
736 ]
737 },
738 "options": {
739 "type": "object",
740 "additionalProperties": true
741 }
742 },
743 "additionalProperties": false
744 },
745 "WatchFilesString": {
746 "type": "string",
747 "minLength": 1
748 },
749 "WebSocketServer": {
750 "anyOf": [
751 {
752 "$ref": "#/definitions/WebSocketServerEnum"
753 },
754 {
755 "$ref": "#/definitions/WebSocketServerString"
756 },
757 {
758 "$ref": "#/definitions/WebSocketServerFunction"
759 },
760 {
761 "$ref": "#/definitions/WebSocketServerObject"
762 }
763 ],
764 "description": "Allows to set web socket server and options (by default 'ws').",
765 "link": "https://webpack.js.org/configuration/dev-server/#devserverwebsocketserver"
766 },
767 "WebSocketServerEnum": {
768 "enum": [false, "sockjs", "ws"]
769 },
770 "WebSocketServerFunction": {
771 "instanceof": "Function"
772 },
773 "WebSocketServerObject": {
774 "type": "object",
775 "cli": {
776 "exclude": true
777 },
778 "properties": {
779 "type": {
780 "anyOf": [
781 {
782 "$ref": "#/definitions/WebSocketServerEnum"
783 },
784 {
785 "$ref": "#/definitions/WebSocketServerString"
786 },
787 {
788 "$ref": "#/definitions/WebSocketServerFunction"
789 }
790 ]
791 },
792 "options": {
793 "type": "object",
794 "additionalProperties": true
795 }
796 },
797 "additionalProperties": false
798 },
799 "WebSocketServerString": {
800 "type": "string",
801 "minLength": 1
802 }
803 },
804 "additionalProperties": false,
805 "properties": {
806 "allowedHosts": {
807 "$ref": "#/definitions/AllowedHosts"
808 },
809 "bonjour": {
810 "$ref": "#/definitions/Bonjour"
811 },
812 "client": {
813 "$ref": "#/definitions/Client"
814 },
815 "compress": {
816 "$ref": "#/definitions/Compress"
817 },
818 "devMiddleware": {
819 "$ref": "#/definitions/DevMiddleware"
820 },
821 "headers": {
822 "$ref": "#/definitions/Headers"
823 },
824 "historyApiFallback": {
825 "$ref": "#/definitions/HistoryApiFallback"
826 },
827 "host": {
828 "$ref": "#/definitions/Host"
829 },
830 "hot": {
831 "$ref": "#/definitions/Hot"
832 },
833 "http2": {
834 "$ref": "#/definitions/HTTP2"
835 },
836 "https": {
837 "$ref": "#/definitions/HTTPS"
838 },
839 "ipc": {
840 "$ref": "#/definitions/IPC"
841 },
842 "liveReload": {
843 "$ref": "#/definitions/LiveReload"
844 },
845 "magicHtml": {
846 "$ref": "#/definitions/MagicHTML"
847 },
848 "onAfterSetupMiddleware": {
849 "$ref": "#/definitions/OnAfterSetupMiddleware"
850 },
851 "onBeforeSetupMiddleware": {
852 "$ref": "#/definitions/OnBeforeSetupMiddleware"
853 },
854 "onListening": {
855 "$ref": "#/definitions/OnListening"
856 },
857 "open": {
858 "$ref": "#/definitions/Open"
859 },
860 "port": {
861 "$ref": "#/definitions/Port"
862 },
863 "proxy": {
864 "$ref": "#/definitions/Proxy"
865 },
866 "setupExitSignals": {
867 "$ref": "#/definitions/SetupExitSignals"
868 },
869 "static": {
870 "$ref": "#/definitions/Static"
871 },
872 "watchFiles": {
873 "$ref": "#/definitions/WatchFiles"
874 },
875 "webSocketServer": {
876 "$ref": "#/definitions/WebSocketServer"
877 }
878 }
879}