Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

webpack-stats-plugin

Package Overview
Dependencies
Maintainers
30
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

webpack-stats-plugin - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

5

HISTORY.md
History
=======
## 1.0.2
* *Bug*: Fix multiple stats output with `webpack --watch`.
[#59](https://github.com/FormidableLabs/webpack-stats-plugin/issues/59)
## 1.0.1

@@ -5,0 +10,0 @@

19

lib/stats-writer-plugin.js

@@ -75,2 +75,5 @@ "use strict";

if (compiler.hooks) {
let emitHookSet = false;
// Capture the compilation and then set up further hooks.
compiler.hooks.thisCompilation.tap("stats-writer-plugin", (compilation) => {

@@ -92,4 +95,10 @@ if (compilation.hooks.processAssets) {

);
} else {
} else if (!emitHookSet) {
// Legacy.
//
// Set up the `compiler` level hook only once to avoid multiple
// calls during `webpack --watch`. (We have to do this here because
// we can't otherwise detect if `compilation.hooks.processAssets` is
// available for modern mode.)
emitHookSet = true;
compiler.hooks.emit.tapPromise("stats-writer-plugin", this.emitStats.bind(this));

@@ -129,2 +138,3 @@ }

// Finish up.
// eslint-disable-next-line max-statements
.then((statsStr) => {

@@ -157,3 +167,8 @@ // Create simple equivalent of RawSource from webpack-sources.

// Modern method.
curCompiler.emitAsset(filename, source);
const asset = curCompiler.getAsset(filename);
if (asset) {
curCompiler.updateAsset(filename, source);
} else {
curCompiler.emitAsset(filename, source);
}
} else {

@@ -160,0 +175,0 @@ // Fallback to deprecated method.

2

package.json
{
"name": "webpack-stats-plugin",
"version": "1.0.1",
"version": "1.0.2",
"description": "Webpack stats plugin",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc