main
Last change
on this file since 79a0317 was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 4 days ago |
F4 Finalna Verzija
|
-
Property mode
set to
100644
|
File size:
1001 bytes
|
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 ModuleDependency = require("./ModuleDependency");
|
---|
10 | const ModuleDependencyTemplateAsId = require("./ModuleDependencyTemplateAsId");
|
---|
11 |
|
---|
12 | /** @typedef {import("../javascript/JavascriptParser").Range} Range */
|
---|
13 |
|
---|
14 | class CommonJsRequireDependency extends ModuleDependency {
|
---|
15 | /**
|
---|
16 | * @param {string} request request
|
---|
17 | * @param {Range=} range location in source code
|
---|
18 | * @param {string=} context request context
|
---|
19 | */
|
---|
20 | constructor(request, range, context) {
|
---|
21 | super(request);
|
---|
22 | this.range = range;
|
---|
23 | this._context = context;
|
---|
24 | }
|
---|
25 |
|
---|
26 | get type() {
|
---|
27 | return "cjs require";
|
---|
28 | }
|
---|
29 |
|
---|
30 | get category() {
|
---|
31 | return "commonjs";
|
---|
32 | }
|
---|
33 | }
|
---|
34 |
|
---|
35 | CommonJsRequireDependency.Template = ModuleDependencyTemplateAsId;
|
---|
36 |
|
---|
37 | makeSerializable(
|
---|
38 | CommonJsRequireDependency,
|
---|
39 | "webpack/lib/dependencies/CommonJsRequireDependency"
|
---|
40 | );
|
---|
41 |
|
---|
42 | module.exports = CommonJsRequireDependency;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.