webpack-bundle-stats-plugin
Advanced tools
@@ -11,12 +11,9 @@ "use strict"; | ||
| apply(compiler) { | ||
| compiler.hooks.compilation.tap('BundleStatsPlugin', (compilation) => { | ||
| // TODO: Is there a better hook to tap than statsFactory? | ||
| compilation.hooks.statsFactory.tap('BundleStatsPlugin', () => { | ||
| var _a, _b; | ||
| const stats = (0, getStatsFromCompilation_1.getStatsFromCompilation)(compilation); | ||
| if (this.options.outputFile) { | ||
| fs.writeFileSync(this.options.outputFile, JSON.stringify(stats, null, 2)); | ||
| } | ||
| (_b = (_a = this.options).onComplete) === null || _b === void 0 ? void 0 : _b.call(_a, stats); | ||
| }); | ||
| compiler.hooks.done.tap('BundleStatsPlugin', (webpackStats) => { | ||
| var _a, _b; | ||
| const stats = (0, getStatsFromCompilation_1.getStatsFromCompilation)(webpackStats.compilation); | ||
| if (this.options.outputFile) { | ||
| fs.writeFileSync(this.options.outputFile, JSON.stringify(stats, null, 2)); | ||
| } | ||
| (_b = (_a = this.options).onComplete) === null || _b === void 0 ? void 0 : _b.call(_a, stats); | ||
| }); | ||
@@ -23,0 +20,0 @@ } |
+1
-1
| { | ||
| "name": "webpack-bundle-stats-plugin", | ||
| "version": "0.1.1", | ||
| "version": "0.1.2", | ||
| "description": "Export internal bundling details from Webpack", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
6564
-2.65%103
-2.83%