/**
 * Minified by jsDelivr using Terser v5.39.0.
 * Original file: /npm/invalidate-assets-list-webpack-plugin@0.1.2/index.js
 *
 * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
 */
var compose=require("lodash/function/compose"),fs=require("fs"),merge=require("lodash/object/merge"),path=require("path"),pluck=require("lodash/collection/pluck"),appendHash=require("./lib/appendHash"),appendPublicPath=require("./lib/appendPublicPath"),filterIgnoredFiles=require("./lib/filterIgnoredFiles");function InvalidateAssetsListPlugin(e){this.options=merge({},{filename:"invalidate-assets.json",hash:!1,ignore:[],matchOptions:{dot:!0,matchBase:!0},path:""},e)}function parseAssets(e){return pluck(e.assets,["name"])}InvalidateAssetsListPlugin.prototype.apply=function(e){e.plugin("after-emit",function(e,s){var t=e.getStats().toJson({hash:!0,publicPath:!0,assets:!0,chunks:!1,modules:!1,source:!1,errorDetails:!1,timings:!1}),i=path.join(this.options.path,this.options.filename);fs.writeFile(i,this.exportList(t),(function(e){e&&console.error("[InvalidateAssetsListPlugin] Error writing a file: "+e),s()}))}.bind(this))},InvalidateAssetsListPlugin.prototype.exportList=function(e){var s=parseAssets(e),t=this.options.publicPath||"/";return JSON.stringify(compose(appendHash(e.hash,this.options.hash),appendPublicPath(t),filterIgnoredFiles(this.options.ignore,this.options.matchOptions))(s))},module.exports=InvalidateAssetsListPlugin;
//# sourceMappingURL=/sm/d3a6e9d7ffb43c150c066c5b0da1c887195186fc8bb75542e11735e7b92a65e4.map