diff --git a/index.js b/index.js index c5e2a3c..ee6ee8b 100644 --- a/index.js +++ b/index.js @@ -51,7 +51,9 @@ ManifestGenerator.prototype.apply = function(compiler){ ManifestGenerator.prototype.setHTMLManifest = function(compilation){ var self = this; self.options.htmlpath.map(function(_path){ - var source_str = compilation.assets[_path].source(); + var data = compilation.assets[_path]; + if (!data) return; + var source_str = data.source(); compilation.assets[_path] = { source: function() { return source_str.replace('