MCPcopy Index your code
hub / github.com/webpack/webpack-dev-server / #getColors

Method #getColors

lib/Server.js:1473–1485  ·  view source on GitHub ↗

* @returns {{ isColorSupported: () => boolean, colors: import("webpack").Colors }} colors support

()

Source from the content-addressed store, hash-verified

1471 * @returns {{ isColorSupported: () => boolean, colors: import("webpack").Colors }} colors support
1472 */
1473 #getColors() {
1474 const compilerOptions =
1475 /** @type {MultiCompiler} */
1476 (this.compiler).compilers
1477 ? /** @type {MultiCompiler} */ (this.compiler).compilers[0].webpack
1478 : /** @type {Compiler} */ (this.compiler).webpack;
1479
1480 const colors = compilerOptions.cli.createColors({
1481 useColor: compilerOptions.cli.isColorSupported(),
1482 });
1483
1484 return { isColorSupported: compilerOptions.cli.isColorSupported, colors };
1485 }
1486
1487 /**
1488 * @private

Callers 1

logStatusMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected