MCPcopy
hub / github.com/webpack/webpack / apply

Method apply

test/Compiler.test.js:1160–1174  ·  view source on GitHub ↗

@param {import("../").Compiler} compiler webpack compiler

(compiler)

Source from the content-addressed store, hash-verified

1158 class MyPlugin {
1159 /** @param {import("../").Compiler} compiler webpack compiler */
1160 apply(compiler) {
1161 const logger = compiler.getInfrastructureLogger("MyPlugin");
1162 logger.time("Time");
1163 logger.group("Group");
1164 logger.error("Error");
1165 logger.warn("Warning");
1166 logger.info("Info");
1167 logger.log("Log");
1168 logger.debug("Debug");
1169 logger.groupCollapsed("Collapsed group");
1170 logger.log("Log inside collapsed group");
1171 logger.groupEnd();
1172 logger.groupEnd();
1173 logger.timeEnd("Time");
1174 }
1175 }
1176
1177 it("should log to the console (verbose)", (done) => {

Callers

nothing calls this directly

Calls 11

timeMethod · 0.80
groupMethod · 0.80
warnMethod · 0.80
infoMethod · 0.80
logMethod · 0.80
debugMethod · 0.80
groupCollapsedMethod · 0.80
groupEndMethod · 0.80
timeEndMethod · 0.80
errorMethod · 0.45

Tested by

no test coverage detected