Skip to content

Commit f8b69b8

Browse files
committed
Add chunkManifest to html-webpack-plugin data
1 parent 268c874 commit f8b69b8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/ChunkManifestPlugin.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ ChunkManifestPlugin.prototype.apply = function(compiler) {
5656
});
5757

5858
if (inlineManifest){
59+
compilation.plugin("html-webpack-plugin-before-html-generation", function (data, callback) {
60+
var manifestHtml = "<script>window." + manifestVariable + "=" + JSON.stringify(chunkManifest) + "</script>";
61+
callback(null, data.assets[manifestVariable] = manifestHtml);
62+
});
5963
}
6064
});
6165
};

0 commit comments

Comments
 (0)