Skip to content

Commit b863851

Browse files
committed
add getStats again - remove breaking change
1 parent 2a1bcff commit b863851

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/Compilation.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ const ModuleTemplate = require("./ModuleTemplate");
2121
const Dependency = require("./Dependency");
2222
const ChunkRenderError = require("./ChunkRenderError");
2323
const CachedSource = require("webpack-sources").CachedSource;
24+
const Stats = require("./Stats");
2425

2526
function byId(a, b) {
2627
if(a.id < b.id) return -1;
@@ -81,6 +82,10 @@ class Compilation extends Tapable {
8182
this.dependencyTemplates = new Map();
8283
}
8384

85+
getStats() {
86+
return new Stats(this);
87+
}
88+
8489
templatesPlugin(name, fn) {
8590
this.mainTemplate.plugin(name, fn);
8691
this.chunkTemplate.plugin(name, fn);

0 commit comments

Comments
 (0)