diff --git a/src/index.js b/src/index.js index 60a64d6..933941b 100644 --- a/src/index.js +++ b/src/index.js @@ -11,6 +11,7 @@ import resolveSchemaFn from './properties/resolve' import outputSchema from './properties/output' import watchOptionsSchema from './properties/watchOptions' import devServerSchema from './properties/devServer' +import performanceSchema from './properties/performance' import { looksLikeAbsolutePath } from './types' import _merge from 'lodash/merge' import sh from 'shelljs' @@ -55,6 +56,7 @@ function makeSchema(schemaOptions, schemaExtension) { })), watch: Joi.boolean(), watchOptions: watchOptionsSchema, + performance: performanceSchema, stats: Joi.any(), // TODO target: Joi.any(), // TODO diff --git a/src/properties/performance/index.js b/src/properties/performance/index.js new file mode 100644 index 0000000..4836bd7 --- /dev/null +++ b/src/properties/performance/index.js @@ -0,0 +1,5 @@ +import Joi from 'joi' + +export default Joi.object({ + hints: Joi.boolean(), +}) diff --git a/src/properties/performance/index.test.js b/src/properties/performance/index.test.js new file mode 100644 index 0000000..d24bca5 --- /dev/null +++ b/src/properties/performance/index.test.js @@ -0,0 +1,11 @@ +import schema from './index' +import { allValid } from '../../../test/utils' + +const validPerformanceConfigs = [ + { input: { hints: true } }, + { input: { hints: false } }, +] + +describe('performance', () => { + allValid(validPerformanceConfigs, schema) +})