Validate your webpack configs using joi schema. Provides static type checking, spell checking, and semantic validations (e.g., preventing simultaneous use of loader and loaders). Current stable version is 3.0.1. The package is in maintenance mode: webpack v2+ has built-in validation, so this package only supports webpack v1. Last update in 2017, with no active development. Key differentiator: it catches errors like misspelled loader names or incorrect plugin usage via a schema-based validation.
npm install webpack-validatorVerified import paths — ran on the pinned version, not inferred.
Shows how to import and use webpack-validator to validate a webpack v1 config, including an example with a common error.
Use webpack v1 or remove webpack-validator if using webpack v2+ (which has built-in validation).
Migrate to webpack v2+ and use its built-in validation, or continue using this package for webpack v1 only.
Provide a custom schema via the second argument to validate() or use the CLI --schema flag.
Use default export for single config, validateRoot for array configs.
Run 'npm install joi' alongside webpack-validator.
Change 'loaders: "babel-loader"' to 'loaders: ["babel-loader"]'.
Use 'const validate = require('webpack-validator');' without .default.