You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lib/options.json
+43-43Lines changed: 43 additions & 43 deletions
Original file line number
Diff line number
Diff line change
@@ -16,17 +16,17 @@
16
16
},
17
17
"publicPath": {
18
18
"anyOf": [
19
-
{
20
-
"type": "string",
21
-
"minLength": 1
22
-
},
23
19
{
24
20
"type": "array",
25
21
"items": {
26
22
"type": "string",
27
23
"minLength": 1
28
24
},
29
25
"minItems": 1
26
+
},
27
+
{
28
+
"type": "string",
29
+
"minLength": 1
30
30
}
31
31
],
32
32
"description": "The bundled files will be available in the browser under this path."
@@ -74,37 +74,37 @@
74
74
"properties": {
75
75
"target": {
76
76
"anyOf": [
77
-
{
78
-
"type": "boolean"
79
-
},
80
-
{
81
-
"type": "string",
82
-
"minLength": 1
83
-
},
84
77
{
85
78
"type": "array",
86
79
"items": {
87
80
"type": "string",
88
81
"minLength": 1
89
82
},
90
83
"minItems": 1
84
+
},
85
+
{
86
+
"type": "boolean"
87
+
},
88
+
{
89
+
"type": "string",
90
+
"minLength": 1
91
91
}
92
92
],
93
93
"description": "Open specified route in browser."
94
94
},
95
95
"app": {
96
96
"anyOf": [
97
-
{
98
-
"type": "string",
99
-
"minLength": 1
100
-
},
101
97
{
102
98
"type": "array",
103
99
"items": {
104
100
"type": "string",
105
101
"minLength": 1
106
102
},
107
103
"minItems": 1
104
+
},
105
+
{
106
+
"type": "string",
107
+
"minLength": 1
108
108
}
109
109
],
110
110
"description": "Open specified browser."
@@ -120,16 +120,16 @@
120
120
"properties": {
121
121
"paths": {
122
122
"anyOf": [
123
-
{
124
-
"type": "string",
125
-
"minLength": 1
126
-
},
127
123
{
128
124
"type": "array",
129
125
"items": {
130
126
"type": "string",
131
127
"minLength": 1
132
128
}
129
+
},
130
+
{
131
+
"type": "string",
132
+
"minLength": 1
133
133
}
134
134
]
135
135
},
@@ -457,15 +457,6 @@
457
457
},
458
458
"open": {
459
459
"anyOf": [
460
-
{
461
-
"$ref": "#/definitions/OpenBoolean"
462
-
},
463
-
{
464
-
"$ref": "#/definitions/OpenString"
465
-
},
466
-
{
467
-
"$ref": "#/definitions/OpenObject"
468
-
},
469
460
{
470
461
"type": "array",
471
462
"items": {
@@ -479,6 +470,15 @@
479
470
]
480
471
},
481
472
"minItems": 1
473
+
},
474
+
{
475
+
"$ref": "#/definitions/OpenBoolean"
476
+
},
477
+
{
478
+
"$ref": "#/definitions/OpenString"
479
+
},
480
+
{
481
+
"$ref": "#/definitions/OpenObject"
482
482
}
483
483
],
484
484
"description": "Tells dev-server to open the browser after server had been started. Set it to true to open your default browser. https://webpack.js.org/configuration/dev-server/#devserveropen"
@@ -529,15 +529,6 @@
529
529
},
530
530
"static": {
531
531
"anyOf": [
532
-
{
533
-
"type": "boolean"
534
-
},
535
-
{
536
-
"$ref": "#/definitions/StaticString"
537
-
},
538
-
{
539
-
"$ref": "#/definitions/StaticObject"
540
-
},
541
532
{
542
533
"type": "array",
543
534
"items": {
@@ -551,18 +542,21 @@
551
542
]
552
543
},
553
544
"minItems": 1
545
+
},
546
+
{
547
+
"type": "boolean"
548
+
},
549
+
{
550
+
"$ref": "#/definitions/StaticString"
551
+
},
552
+
{
553
+
"$ref": "#/definitions/StaticObject"
554
554
}
555
555
],
556
556
"description": "It is possible to configure advanced options for serving static files from directory. See the Express documentation for the possible options. https://webpack.js.org/configuration/dev-server/#devserverstatic"
557
557
},
558
558
"watchFiles": {
559
559
"anyOf": [
560
-
{
561
-
"$ref": "#/definitions/WatchFilesString"
562
-
},
563
-
{
564
-
"$ref": "#/definitions/WatchFilesObject"
565
-
},
566
560
{
567
561
"type": "array",
568
562
"items": {
@@ -575,6 +569,12 @@
575
569
}
576
570
]
577
571
}
572
+
},
573
+
{
574
+
"$ref": "#/definitions/WatchFilesString"
575
+
},
576
+
{
577
+
"$ref": "#/definitions/WatchFilesObject"
578
578
}
579
579
],
580
580
"description": "List of files to watch for file changes and serve. https://webpack.js.org/configuration/dev-server/#devserverwatchfiles"
Copy file name to clipboardExpand all lines: test/__snapshots__/validate-options.test.js.snap.webpack4
+31-31Lines changed: 31 additions & 31 deletions
Original file line number
Diff line number
Diff line change
@@ -335,16 +335,16 @@ exports[`options validate should throw an error on the "open" option with '[]' v
335
335
exports[`options validate should throw an error on the "open" option with '{"app":true}' value 1`] = `
336
336
"ValidationError: Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
337
337
- configuration.open should be one of these:
338
-
boolean | non-empty string | object { target?, app? } | [non-empty string | object { target?, app? }, ...] (should not have fewer than 1 item)
338
+
[non-empty string | object { target?, app? }, ...] (should not have fewer than 1 item) | boolean | non-empty string | object { target?, app? }
339
339
-> Tells dev-server to open the browser after server had been started. Set it to true to open your default browser. https://webpack.js.org/configuration/dev-server/#devserveropen
340
340
Details:
341
341
* configuration.open.app should be one of these:
342
-
non-empty string | [non-empty string, ...] (should not have fewer than 1 item)
342
+
[non-empty string, ...] (should not have fewer than 1 item) | non-empty string
343
343
-> Open specified browser.
344
344
Details:
345
-
* configuration.open.app should be a non-empty string.
346
345
* configuration.open.app should be an array:
347
-
[non-empty string, ...] (should not have fewer than 1 item)"
346
+
[non-empty string, ...] (should not have fewer than 1 item)
347
+
* configuration.open.app should be a non-empty string."
348
348
`;
349
349
350
350
exports[`options validate should throw an error on the "open" option with '{"foo":"bar"}' value 1`] = `
@@ -356,17 +356,17 @@ exports[`options validate should throw an error on the "open" option with '{"foo
356
356
exports[`options validate should throw an error on the "open" option with '{"target":90}' value 1`] = `
357
357
"ValidationError: Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
358
358
- configuration.open should be one of these:
359
-
boolean | non-empty string | object { target?, app? } | [non-empty string | object { target?, app? }, ...] (should not have fewer than 1 item)
359
+
[non-empty string | object { target?, app? }, ...] (should not have fewer than 1 item) | boolean | non-empty string | object { target?, app? }
360
360
-> Tells dev-server to open the browser after server had been started. Set it to true to open your default browser. https://webpack.js.org/configuration/dev-server/#devserveropen
361
361
Details:
362
362
* configuration.open.target should be one of these:
363
-
boolean | non-empty string | [non-empty string, ...] (should not have fewer than 1 item)
363
+
[non-empty string, ...] (should not have fewer than 1 item) | boolean | non-empty string
364
364
-> Open specified route in browser.
365
365
Details:
366
-
* configuration.open.target should be a boolean.
367
-
* configuration.open.target should be a non-empty string.
368
366
* configuration.open.target should be an array:
369
-
[non-empty string, ...] (should not have fewer than 1 item)"
367
+
[non-empty string, ...] (should not have fewer than 1 item)
368
+
* configuration.open.target should be a boolean.
369
+
* configuration.open.target should be a non-empty string."
370
370
`;
371
371
372
372
exports[`options validate should throw an error on the "port" option with 'false' value 1`] = `
@@ -440,22 +440,22 @@ exports[`options validate should throw an error on the "static" option with '{"d
440
440
exports[`options validate should throw an error on the "static" option with '{"publicPath":false}' value 1`] = `
441
441
"ValidationError: Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
-> It is possible to configure advanced options for serving static files from directory. See the Express documentation for the possible options. https://webpack.js.org/configuration/dev-server/#devserverstatic
445
445
Details:
446
446
* configuration.static.publicPath should be one of these:
447
-
non-empty string | [non-empty string, ...] (should not have fewer than 1 item)
447
+
[non-empty string, ...] (should not have fewer than 1 item) | non-empty string
448
448
-> The bundled files will be available in the browser under this path.
449
449
Details:
450
-
* configuration.static.publicPath should be a non-empty string.
451
450
* configuration.static.publicPath should be an array:
452
-
[non-empty string, ...] (should not have fewer than 1 item)"
451
+
[non-empty string, ...] (should not have fewer than 1 item)
452
+
* configuration.static.publicPath should be a non-empty string."
453
453
`;
454
454
455
455
exports[`options validate should throw an error on the "static" option with '{"serveIndex":"true"}' value 1`] = `
456
456
"ValidationError: Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
-> It is possible to configure advanced options for serving static files from directory. See the Express documentation for the possible options. https://webpack.js.org/configuration/dev-server/#devserverstatic
460
460
Details:
461
461
* configuration.static.serveIndex should be one of these:
@@ -470,7 +470,7 @@ exports[`options validate should throw an error on the "static" option with '{"s
470
470
exports[`options validate should throw an error on the "static" option with '{"watch":10}' value 1`] = `
471
471
"ValidationError: Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
-> It is possible to configure advanced options for serving static files from directory. See the Express documentation for the possible options. https://webpack.js.org/configuration/dev-server/#devserverstatic
475
475
Details:
476
476
* configuration.static.watch should be one of these:
@@ -486,55 +486,55 @@ exports[`options validate should throw an error on the "static" option with '{"w
486
486
exports[`options validate should throw an error on the "static" option with '0' value 1`] = `
487
487
"ValidationError: Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
-> It is possible to configure advanced options for serving static files from directory. See the Express documentation for the possible options. https://webpack.js.org/configuration/dev-server/#devserverstatic
491
491
Details:
492
+
* configuration.static should be an array:
493
+
[non-empty string | object { directory?, staticOptions?, publicPath?, serveIndex?, watch? }, ...] (should not have fewer than 1 item)
492
494
* configuration.static should be a boolean.
493
495
* configuration.static should be a non-empty string.
-> It is possible to configure advanced options for serving static files from directory. See the Express documentation for the possible options. https://webpack.js.org/configuration/dev-server/#devserverstatic
505
505
Details:
506
+
* configuration.static should be an array:
507
+
[non-empty string | object { directory?, staticOptions?, publicPath?, serveIndex?, watch? }, ...] (should not have fewer than 1 item)
506
508
* configuration.static should be a boolean.
507
509
* configuration.static should be a non-empty string.
0 commit comments