a zip code crypto-currency system good for red ONLY

JsonpHotUpdateChunkTemplatePlugin.js 852B

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 JsonpHotUpdateChunkTemplatePlugin {
  8. apply(hotUpdateChunkTemplate) {
  9. hotUpdateChunkTemplate.plugin("render", function(modulesSource, modules, removedModules, hash, id) {
  10. const source = new ConcatSource();
  11. source.add(`${this.outputOptions.hotUpdateFunction}(${JSON.stringify(id)},`);
  12. source.add(modulesSource);
  13. source.add(")");
  14. return source;
  15. });
  16. hotUpdateChunkTemplate.plugin("hash", function(hash) {
  17. hash.update("JsonpHotUpdateChunkTemplatePlugin");
  18. hash.update("3");
  19. hash.update(`${this.outputOptions.hotUpdateFunction}`);
  20. hash.update(`${this.outputOptions.library}`);
  21. });
  22. }
  23. }
  24. module.exports = JsonpHotUpdateChunkTemplatePlugin;