source: imaps-frontend/node_modules/webpack/lib/dependencies/RequireResolveDependency.js@ 79a0317

main
Last change on this file since 79a0317 was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 3 days ago

F4 Finalna Verzija

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