source: trip-planner-front/node_modules/webpack/lib/container/ContainerExposedDependency.js@ 84d0fbb

Last change on this file since 84d0fbb 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, Zackary Jackson @ScriptedAlchemy, Marais Rossouw @maraisr
4*/
5
6"use strict";
7
8const ModuleDependency = require("../dependencies/ModuleDependency");
9const makeSerializable = require("../util/makeSerializable");
10
11class ContainerExposedDependency extends ModuleDependency {
12 /**
13 * @param {string} exposedName public name
14 * @param {string} request request to module
15 */
16 constructor(exposedName, request) {
17 super(request);
18 this.exposedName = exposedName;
19 }
20
21 get type() {
22 return "container exposed";
23 }
24
25 get category() {
26 return "esm";
27 }
28
29 /**
30 * @returns {string | null} an identifier to merge equal requests
31 */
32 getResourceIdentifier() {
33 return `exposed dependency ${this.exposedName}=${this.request}`;
34 }
35
36 serialize(context) {
37 context.write(this.exposedName);
38 super.serialize(context);
39 }
40
41 deserialize(context) {
42 this.exposedName = context.read();
43 super.deserialize(context);
44 }
45}
46
47makeSerializable(
48 ContainerExposedDependency,
49 "webpack/lib/container/ContainerExposedDependency"
50);
51
52module.exports = ContainerExposedDependency;
Note: See TracBrowser for help on using the repository browser.