commit node_modules and generated files
This commit is contained in:
parent
6d7a135fea
commit
34b372292b
3379 changed files with 449603 additions and 2029 deletions
21
node_modules/webpack-cli/bin/utils/validate-options.js
generated
vendored
Normal file
21
node_modules/webpack-cli/bin/utils/validate-options.js
generated
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
const webpackConfigurationSchema = require("../config/webpackConfigurationSchema.json");
|
||||
const validateSchema = require("webpack").validateSchema;
|
||||
|
||||
module.exports = function validateOptions(options) {
|
||||
let error;
|
||||
try {
|
||||
const errors = validateSchema(webpackConfigurationSchema, options);
|
||||
if (errors && errors.length > 0) {
|
||||
const { WebpackOptionsValidationError } = require("webpack");
|
||||
error = new WebpackOptionsValidationError(errors);
|
||||
}
|
||||
} catch (err) {
|
||||
error = err;
|
||||
}
|
||||
|
||||
if (error) {
|
||||
console.error(error.message);
|
||||
// eslint-disable-next-line no-process-exit
|
||||
process.exit(-1);
|
||||
}
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue