2025-07-16 22:29:28 +08:00
|
|
|
"use strict";
|
|
|
|
|
|
2019-07-31 23:16:37 +08:00
|
|
|
const LogTestPlugin = require("../../helpers/LogTestPlugin");
|
add logging API
Plugins:
Compiler.getInfrastructureLogger(name)
Compilation.getLogger(name)
Loader:
this.getLogger([name])
API equal to console API with these methods:
error, warn, info, log, debug,
time, timeLog, timeEnd,
group, groupCollapsed, groupEnd,
profile, profileEnd,
clear
2019-07-18 23:13:40 +08:00
|
|
|
|
2020-04-20 13:36:55 +08:00
|
|
|
/** @type {import("../../../").Configuration} */
|
add logging API
Plugins:
Compiler.getInfrastructureLogger(name)
Compilation.getLogger(name)
Loader:
this.getLogger([name])
API equal to console API with these methods:
error, warn, info, log, debug,
time, timeLog, timeEnd,
group, groupCollapsed, groupEnd,
profile, profileEnd,
clear
2019-07-18 23:13:40 +08:00
|
|
|
module.exports = {
|
|
|
|
|
mode: "production",
|
|
|
|
|
entry: "./index",
|
|
|
|
|
performance: false,
|
|
|
|
|
module: {
|
|
|
|
|
rules: [
|
|
|
|
|
{
|
|
|
|
|
test: /index\.js$/,
|
|
|
|
|
use: "custom-loader"
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
},
|
2019-07-31 23:16:37 +08:00
|
|
|
plugins: [new LogTestPlugin(true)],
|
add logging API
Plugins:
Compiler.getInfrastructureLogger(name)
Compilation.getLogger(name)
Loader:
this.getLogger([name])
API equal to console API with these methods:
error, warn, info, log, debug,
time, timeLog, timeEnd,
group, groupCollapsed, groupEnd,
profile, profileEnd,
clear
2019-07-18 23:13:40 +08:00
|
|
|
stats: {
|
|
|
|
|
colors: true,
|
|
|
|
|
logging: true,
|
2019-07-22 14:23:40 +08:00
|
|
|
loggingDebug: "custom-loader",
|
add logging API
Plugins:
Compiler.getInfrastructureLogger(name)
Compilation.getLogger(name)
Loader:
this.getLogger([name])
API equal to console API with these methods:
error, warn, info, log, debug,
time, timeLog, timeEnd,
group, groupCollapsed, groupEnd,
profile, profileEnd,
clear
2019-07-18 23:13:40 +08:00
|
|
|
loggingTrace: true
|
|
|
|
|
}
|
|
|
|
|
};
|