How to use the webpack-cli/bin/errorHelpers.cleanUpWebpackOptions function in webpack-cli

To help you get started, we’ve selected a few webpack-cli examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github enten / udk / bin / udk.webpack4-cli.js View on Github external
return;
		}

		if (argv.verbose) {
			argv["display"] = "verbose";
		}

		let options;
		try {
			options = require("webpack-cli/bin/convert-argv")(argv);
		} catch (err) {
			if (err.name !== "ValidationError") {
				throw err;
			}

			const stack = ErrorHelpers.cleanUpWebpackOptions(err.stack, err.message);
			const message = err.message + "\n" + stack;

			if (argv.color) {
				console.error(`\u001b[1m\u001b[31m${message}\u001b[39m\u001b[22m`);
			} else {
				console.error(message);
			}

			process.exitCode = 1;
			return;
		}

		/**
		 * When --silent flag is present, an object with a no-op write method is
		 * used in place of process.stout
		 */

webpack-cli

CLI for webpack & friends

MIT
Latest version published 1 year ago

Package Health Score

93 / 100
Full package analysis