Last change
on this file since eed0bf8 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
1.0 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 |
|
---|
8 | const makeSerializable = require("../util/makeSerializable");
|
---|
9 | const ContextDependency = require("./ContextDependency");
|
---|
10 | const ContextDependencyTemplateAsId = require("./ContextDependencyTemplateAsId");
|
---|
11 |
|
---|
12 | class RequireResolveContextDependency 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 "amd 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 |
|
---|
43 | makeSerializable(
|
---|
44 | RequireResolveContextDependency,
|
---|
45 | "webpack/lib/dependencies/RequireResolveContextDependency"
|
---|
46 | );
|
---|
47 |
|
---|
48 | RequireResolveContextDependency.Template = ContextDependencyTemplateAsId;
|
---|
49 |
|
---|
50 | module.exports = RequireResolveContextDependency;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.