Skip to content

Commit

Permalink
Fix the HTML does not exist.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Jun 2, 2016
1 parent 8a64295 commit 45e87da
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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('<html','<html manifest="'+self.options.filename+'"');
Expand Down

0 comments on commit 45e87da

Please sign in to comment.