Sha256: 83e5894b19ecfd2a896757f4475e50e741cf331889d04772b85fed6bdb20cef8
Contents?: true
Size: 658 Bytes
Versions: 11
Compression:
Stored size: 658 Bytes
Contents
/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; const ConcatSource = require("webpack-sources").ConcatSource; class NodeChunkTemplatePlugin { apply(chunkTemplate) { chunkTemplate.plugin("render", function(modules, chunk) { const source = new ConcatSource(); source.add(`exports.ids = ${JSON.stringify(chunk.ids)};\nexports.modules = `); source.add(modules); source.add(";"); return source; }); chunkTemplate.plugin("hash", function(hash) { hash.update("node"); hash.update("3"); }); } } module.exports = NodeChunkTemplatePlugin;
Version data entries
11 entries across 7 versions & 4 rubygems