This repository has been archived on 2026-03-06. You can view files and clone it, but cannot push or open issues or pull requests.
todo/client/node_modules/fork-ts-checker-webpack-plugin/lib/logger/LoggerFactory.js

21 lines
755 B
JavaScript
Raw Normal View History

2025-06-13 06:04:40 +00:00
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const WebpackInfrastructureLogger_1 = require("./WebpackInfrastructureLogger");
const PartialLogger_1 = require("./PartialLogger");
function createLogger(type, compiler) {
if (typeof type !== 'string') {
return type;
}
switch (type) {
case 'webpack-infrastructure':
return (WebpackInfrastructureLogger_1.createWebpackInfrastructureLogger(compiler) ||
PartialLogger_1.createPartialLogger(['log', 'error'], console));
case 'silent':
return PartialLogger_1.createPartialLogger([], console);
case 'console':
default:
return console;
}
}
exports.createLogger = createLogger;