webpack-stream
Advanced tools
Comparing version 6.0.0 to 6.1.0
16
index.js
@@ -198,15 +198,11 @@ 'use strict'; | ||
var afterEmitPlugin = compiler.hooks | ||
var assetEmittedPlugin = compiler.hooks | ||
// Webpack 4 | ||
? function (callback) { compiler.hooks.afterEmit.tapAsync('WebpackStream', callback); } | ||
? function (callback) { compiler.hooks.assetEmitted.tapAsync('WebpackStream', callback); } | ||
// Webpack 2/3 | ||
: function (callback) { compiler.plugin('after-emit', callback); }; | ||
: function (callback) { compiler.plugin('asset-emitted', callback); }; | ||
afterEmitPlugin(function (compilation, callback) { | ||
Object.keys(compilation.assets).forEach(function (outname) { | ||
if (compilation.assets[outname].emitted) { | ||
var file = prepareFile(fs, compiler, outname); | ||
self.queue(file); | ||
} | ||
}); | ||
assetEmittedPlugin(function (outname, _, callback) { | ||
var file = prepareFile(fs, compiler, outname); | ||
self.queue(file); | ||
callback(); | ||
@@ -213,0 +209,0 @@ }); |
{ | ||
"name": "webpack-stream", | ||
"version": "6.0.0", | ||
"version": "6.1.0", | ||
"description": "Run webpack as a stream", | ||
@@ -14,3 +14,3 @@ "license": "MIT", | ||
"engines": { | ||
"node": ">= 6.11.5" | ||
"node": ">= 8.0.0" | ||
}, | ||
@@ -35,3 +35,3 @@ "scripts": { | ||
"plugin-error": "^1.0.1", | ||
"supports-color": "^7.1.0", | ||
"supports-color": "^7.2.0", | ||
"through": "^2.3.8", | ||
@@ -38,0 +38,0 @@ "vinyl": "^2.1.0", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
16107
222
Updatedsupports-color@^7.2.0