in packages/docpack-page-generator/lib/plugin.js [194:215]
PageGeneratorPlugin.prototype.render = function(compilation, target, targets) {
var config = this.config;
var defaultContext = {
source: target,
sources: targets,
publicPath: compilation.outputOptions.publicPath,
assetsByChunkName: this._assetsByChunkName
};
var context;
if (typeof config.context == 'function') {
context = merge(defaultContext, config.context(targets, target));
if (!isPlainObject(context)) {
throw new Error('`context` function should return an object');
}
} else {
context = merge(defaultContext, config.context);
}
return this.renderer(context);
};