source: trip-planner-front/node_modules/webpack/lib/dependencies/RequireResolveDependency.js@ 6a3a178

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

initial commit

  • Property mode set to 100644
File size: 1.3 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 Dependency = require("../Dependency");
9const makeSerializable = require("../util/makeSerializable");
10const ModuleDependency = require("./ModuleDependency");
11const ModuleDependencyAsId = require("./ModuleDependencyTemplateAsId");
12
13/** @typedef {import("../Dependency").ReferencedExport} ReferencedExport */
14/** @typedef {import("../ModuleGraph")} ModuleGraph */
15/** @typedef {import("../util/runtime").RuntimeSpec} RuntimeSpec */
16
17class RequireResolveDependency extends ModuleDependency {
18 constructor(request, range) {
19 super(request);
20
21 this.range = range;
22 }
23
24 get type() {
25 return "require.resolve";
26 }
27
28 get category() {
29 return "commonjs";
30 }
31
32 /**
33 * Returns list of exports referenced by this dependency
34 * @param {ModuleGraph} moduleGraph module graph
35 * @param {RuntimeSpec} runtime the runtime for which the module is analysed
36 * @returns {(string[] | ReferencedExport)[]} referenced exports
37 */
38 getReferencedExports(moduleGraph, runtime) {
39 // This doesn't use any export
40 return Dependency.NO_EXPORTS_REFERENCED;
41 }
42}
43
44makeSerializable(
45 RequireResolveDependency,
46 "webpack/lib/dependencies/RequireResolveDependency"
47);
48
49RequireResolveDependency.Template = ModuleDependencyAsId;
50
51module.exports = RequireResolveDependency;
Note: See TracBrowser for help on using the repository browser.