a zip code crypto-currency system good for red ONLY

RequireHeaderDependency.js 681B

123456789101112131415161718192021222324252627
  1. /*
  2. MIT License http://www.opensource.org/licenses/mit-license.php
  3. Author Tobias Koppers @sokra
  4. */
  5. "use strict";
  6. const NullDependency = require("./NullDependency");
  7. class RequireHeaderDependency extends NullDependency {
  8. constructor(range) {
  9. super();
  10. if(!Array.isArray(range)) throw new Error("range must be valid");
  11. this.range = range;
  12. }
  13. }
  14. RequireHeaderDependency.Template = class RequireHeaderDependencyTemplate {
  15. apply(dep, source) {
  16. source.replace(dep.range[0], dep.range[1] - 1, "__webpack_require__");
  17. }
  18. applyAsTemplateArgument(name, dep, source) {
  19. source.replace(dep.range[0], dep.range[1] - 1, "require");
  20. }
  21. };
  22. module.exports = RequireHeaderDependency;