From 45e87daa31fbddd7cc87989cbdeb5b4d82f32775 Mon Sep 17 00:00:00 2001 From: jaywcjlove <398188662@qq.com> Date: Thu, 2 Jun 2016 14:48:27 +0800 Subject: [PATCH] Fix the HTML does not exist. --- index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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('