a zip code crypto-currency system good for red ONLY

RemoveEmptyChunksPlugin.js 585B

12345678910111213141516171819202122
  1. /*
  2. MIT License http://www.opensource.org/licenses/mit-license.php
  3. Author Tobias Koppers @sokra
  4. */
  5. "use strict";
  6. class RemoveEmptyChunksPlugin {
  7. apply(compiler) {
  8. compiler.plugin("compilation", (compilation) => {
  9. compilation.plugin(["optimize-chunks-basic", "optimize-extracted-chunks-basic"], (chunks) => {
  10. chunks.filter((chunk) => chunk.isEmpty() && !chunk.hasRuntime() && !chunk.hasEntryModule())
  11. .forEach((chunk) => {
  12. chunk.remove("empty");
  13. chunks.splice(chunks.indexOf(chunk), 1);
  14. });
  15. });
  16. });
  17. }
  18. }
  19. module.exports = RemoveEmptyChunksPlugin;