Last change
on this file 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 |
|
---|
11 | class AMDRequireContextDependency extends ContextDependency {
|
---|
12 | constructor(options, range, valueRange) {
|
---|
13 | super(options);
|
---|
14 |
|
---|
15 | this.range = range;
|
---|
16 | this.valueRange = valueRange;
|
---|
17 | }
|
---|
18 |
|
---|
19 | get type() {
|
---|
20 | return "amd require context";
|
---|
21 | }
|
---|
22 |
|
---|
23 | get category() {
|
---|
24 | return "amd";
|
---|
25 | }
|
---|
26 |
|
---|
27 | serialize(context) {
|
---|
28 | const { write } = context;
|
---|
29 |
|
---|
30 | write(this.range);
|
---|
31 | write(this.valueRange);
|
---|
32 |
|
---|
33 | super.serialize(context);
|
---|
34 | }
|
---|
35 |
|
---|
36 | deserialize(context) {
|
---|
37 | const { read } = context;
|
---|
38 |
|
---|
39 | this.range = read();
|
---|
40 | this.valueRange = read();
|
---|
41 |
|
---|
42 | super.deserialize(context);
|
---|
43 | }
|
---|
44 | }
|
---|
45 |
|
---|
46 | makeSerializable(
|
---|
47 | AMDRequireContextDependency,
|
---|
48 | "webpack/lib/dependencies/AMDRequireContextDependency"
|
---|
49 | );
|
---|
50 |
|
---|
51 | AMDRequireContextDependency.Template = require("./ContextDependencyTemplateAsRequireCall");
|
---|
52 |
|
---|
53 | module.exports = AMDRequireContextDependency;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.