2022-03-26 20:24:14 +08:00

29 lines
995 B
JavaScript

export default (api) => {
api.describe({
key: 'devServer',
config: {
default: {},
schema(joi) {
return joi
.object({
port: joi.number().description('devServer port, default 8000'),
host: joi.string(),
https: joi.alternatives(
joi
.object({
key: joi.string(),
cert: joi.string(),
})
.unknown(),
joi.boolean(),
),
headers: joi.object(),
writeToDisk: joi.alternatives(joi.boolean(), joi.function()),
})
.description('devServer configs')
.unknown(true);
},
},
});
};