Skip to content

Commit a7fa191

Browse files
committed
fix: fix a regression that pages doesn't allow entry-only string format
fixes #3233
1 parent fb99079 commit a7fa191

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

packages/@vue/cli-service/lib/options.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,15 @@ const schema = createSchema(joi => joi.object({
1111
productionSourceMap: joi.boolean(),
1212
parallel: joi.boolean(),
1313
devServer: joi.object(),
14-
pages: joi.object().pattern(/\w+/, joi.object().keys({
15-
entry: joi.string().required()
16-
}).unknown(true)),
14+
pages: joi.object().pattern(
15+
/\w+/,
16+
joi.alternatives().try([
17+
joi.string(),
18+
joi.object().keys({
19+
entry: joi.string().required()
20+
}).unknown(true)
21+
])
22+
),
1723
crossorigin: joi.string().valid(['', 'anonymous', 'use-credentials']),
1824
integrity: joi.boolean(),
1925

0 commit comments

Comments
 (0)