You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

13 lines
497 B

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.StatsJsonPlugin = void 0;
const webpack_1 = require("webpack");
class StatsJsonPlugin {
apply(compiler) {
compiler.hooks.emit.tap('StatsJsonPlugin', (compilation) => {
const data = JSON.stringify(compilation.getStats().toJson('verbose'));
compilation.assets[`stats.json`] = new webpack_1.sources.RawSource(data);
});
}
}
exports.StatsJsonPlugin = StatsJsonPlugin;