browserify / factor-bundle

factor browser-pack bundles into common shared bundles
Other
400 stars 27 forks source link

Wait for factored pipelines to drain before ending main pipeline #90

Open goto-bus-stop opened 6 years ago

goto-bus-stop commented 6 years ago

The upgrade to labeled-stream-splicer@2 in https://github.com/browserify/factor-bundle/commit/532b1e48397a8a2580fa87c6a867b866069ad1b5 broke a test, because of some fun times with stream end timings. The factored files were not written fully by the time the common bundle was finished. This patch ensures that all entries are fully written before the main bundle stream completes. This way you can reliably use the bundle.on('end') event as well.