source: trip-planner-front/node_modules/webpack/lib/dependencies/CommonJsRequireContextDependency.js@ 59329aa

Last change on this file since 59329aa was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 1.1 KB
Line 
1/*
2 MIT License http://www.opensource.org/licenses/mit-license.php
3 Author Tobias Koppers @sokra
4*/
5
6"use strict";
7
8const makeSerializable = require("../util/makeSerializable");
9const ContextDependency = require("./ContextDependency");
10const ContextDependencyTemplateAsRequireCall = require("./ContextDependencyTemplateAsRequireCall");
11
12class CommonJsRequireContextDependency extends ContextDependency {
13 constructor(options, range, valueRange) {
14 super(options);
15
16 this.range = range;
17 this.valueRange = valueRange;
18 }
19
20 get type() {
21 return "cjs require context";
22 }
23
24 serialize(context) {
25 const { write } = context;
26
27 write(this.range);
28 write(this.valueRange);
29
30 super.serialize(context);
31 }
32
33 deserialize(context) {
34 const { read } = context;
35
36 this.range = read();
37 this.valueRange = read();
38
39 super.deserialize(context);
40 }
41}
42
43makeSerializable(
44 CommonJsRequireContextDependency,
45 "webpack/lib/dependencies/CommonJsRequireContextDependency"
46);
47
48CommonJsRequireContextDependency.Template =
49 ContextDependencyTemplateAsRequireCall;
50
51module.exports = CommonJsRequireContextDependency;
Note: See TracBrowser for help on using the repository browser.