source: trip-planner-front/node_modules/webpack/lib/dependencies/RequireContextDependency.js@ 8d391a1

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

initial commit

  • Property mode set to 100644
File size: 950 bytes
RevLine 
[6a3a178]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 ModuleDependencyTemplateAsRequireId = require("./ModuleDependencyTemplateAsRequireId");
11
12class RequireContextDependency extends ContextDependency {
13 constructor(options, range) {
14 super(options);
15
16 this.range = range;
17 }
18
19 get type() {
20 return "require.context";
21 }
22
23 serialize(context) {
24 const { write } = context;
25
26 write(this.range);
27
28 super.serialize(context);
29 }
30
31 deserialize(context) {
32 const { read } = context;
33
34 this.range = read();
35
36 super.deserialize(context);
37 }
38}
39
40makeSerializable(
41 RequireContextDependency,
42 "webpack/lib/dependencies/RequireContextDependency"
43);
44
45RequireContextDependency.Template = ModuleDependencyTemplateAsRequireId;
46
47module.exports = RequireContextDependency;
Note: See TracBrowser for help on using the repository browser.