levp / wrapper-webpack-plugin

A webpack plugin that wraps output files (chunks) with custom text or code.
91 stars 37 forks source link

Implement a Source cache to avoid over-eager emitting #12

Open marcins opened 4 years ago

marcins commented 4 years ago

This change implements a cache for Sources generated by this plugin so that on subsequent builds (i.e. incremental builds) we can re-use the same Source if the content hasn't changed.

This improves performance with Webpack's futureEmitAssets mode, where there is a cache based on Source referential identity that determines whether an asset should be re-emitted.

Fixes #7