1 | module.exports = class Reporter {
|
2 | /**
|
3 | @constructor
|
4 | @param compiler {Object} A webpack Compiler instance https://webpack.js.org/api/node/#compiler-instance
|
5 | */
|
6 | // eslint-disable-next-line no-unused-vars
|
7 | constructor(options) {
|
8 | this.compiler = options.compiler;
|
9 | this.config = options.config;
|
10 | }
|
11 |
|
12 | /**
|
13 | NOTE: Reporters also support a progress handler, which is called when webpack
|
14 | reports progress on a build, typically in tandem with the --progress CLI flag.
|
15 |
|
16 | @method progress
|
17 | @param data {Object} An object containing data on the current progress state of a build.
|
18 |
|
19 | const data = {
|
20 | profile: Boolean,
|
21 | fileName: String,
|
22 | scope: String,
|
23 | step: {
|
24 | index: Number,
|
25 | modulePosition: Number,
|
26 | name: String,
|
27 | percentage: Number,
|
28 | state: String,
|
29 | totalModules: Number,
|
30 | },
|
31 | };
|
32 | */
|
33 | // eslint-disable-next-line no-unused-vars
|
34 | progress(data) {}
|
35 |
|
36 | /**
|
37 | @method render
|
38 | @param error {Error} An Error object
|
39 | @param stats {Object} A webpack stats object https://webpack.js.org/api/node/#stats-object
|
40 | */
|
41 | // eslint-disable-next-line no-unused-vars
|
42 | render(error, stats) {}
|
43 | };
|