a zip code crypto-currency system good for red ONLY

NodeTemplatePlugin.js 843B

12345678910111213141516171819202122232425262728
  1. /*
  2. MIT License http://www.opensource.org/licenses/mit-license.php
  3. Author Tobias Koppers @sokra
  4. */
  5. "use strict";
  6. const NodeMainTemplatePlugin = require("./NodeMainTemplatePlugin");
  7. const NodeChunkTemplatePlugin = require("./NodeChunkTemplatePlugin");
  8. const NodeHotUpdateChunkTemplatePlugin = require("./NodeHotUpdateChunkTemplatePlugin");
  9. class NodeTemplatePlugin {
  10. constructor(options) {
  11. options = options || {};
  12. this.asyncChunkLoading = options.asyncChunkLoading;
  13. }
  14. apply(compiler) {
  15. compiler.plugin("this-compilation", (compilation) => {
  16. compilation.mainTemplate.apply(new NodeMainTemplatePlugin(this.asyncChunkLoading));
  17. compilation.chunkTemplate.apply(new NodeChunkTemplatePlugin());
  18. compilation.hotUpdateChunkTemplate.apply(new NodeHotUpdateChunkTemplatePlugin());
  19. });
  20. }
  21. }
  22. module.exports = NodeTemplatePlugin;