mirror of
https://github.com/WeBankFinTech/fes.js.git
synced 2025-09-05 14:59:51 +08:00
30 lines
991 B
JavaScript
30 lines
991 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);
|
|
}
|
|
}
|
|
});
|
|
};
|