a zip code crypto-currency system good for red ONLY

NodeHotUpdateChunkTemplatePlugin.js 842B

12345678910111213141516171819202122232425262728
  1. /*
  2. MIT License http://www.opensource.org/licenses/mit-license.php
  3. Author Tobias Koppers @sokra
  4. */
  5. "use strict";
  6. const ConcatSource = require("webpack-sources").ConcatSource;
  7. class NodeHotUpdateChunkTemplatePlugin {
  8. apply(hotUpdateChunkTemplate) {
  9. hotUpdateChunkTemplate.plugin("render", (modulesSource, modules, removedModules, hash, id) => {
  10. const source = new ConcatSource();
  11. source.add("exports.id = " + JSON.stringify(id) + ";\nexports.modules = ");
  12. source.add(modulesSource);
  13. source.add(";");
  14. return source;
  15. });
  16. hotUpdateChunkTemplate.plugin("hash", function(hash) {
  17. hash.update("NodeHotUpdateChunkTemplatePlugin");
  18. hash.update("3");
  19. hash.update(this.outputOptions.hotUpdateFunction + "");
  20. hash.update(this.outputOptions.library + "");
  21. });
  22. }
  23. }
  24. module.exports = NodeHotUpdateChunkTemplatePlugin;