source: frontend/node_modules/webpack/lib/dependencies/ImportMetaContextDependency.js

Last change on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 12 days ago

Fix frontend appearance

  • 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 Ivan Kopeykin @vankop
4*/
5
6"use strict";
7
8const makeSerializable = require("../util/makeSerializable");
9const ContextDependency = require("./ContextDependency");
10const ModuleDependencyTemplateAsRequireId = require("./ModuleDependencyTemplateAsRequireId");
11
12/** @typedef {import("../javascript/JavascriptParser").Range} Range */
13/** @typedef {import("./ContextDependency").ContextDependencyOptions} ContextDependencyOptions */
14
15class ImportMetaContextDependency extends ContextDependency {
16 /**
17 * Creates an instance of ImportMetaContextDependency.
18 * @param {ContextDependencyOptions} options options
19 * @param {Range} range range
20 */
21 constructor(options, range) {
22 super(options);
23
24 this.range = range;
25 }
26
27 get category() {
28 return "esm";
29 }
30
31 get type() {
32 return `import.meta.webpackContext ${this.options.mode}`;
33 }
34}
35
36makeSerializable(
37 ImportMetaContextDependency,
38 "webpack/lib/dependencies/ImportMetaContextDependency"
39);
40
41ImportMetaContextDependency.Template = ModuleDependencyTemplateAsRequireId;
42
43module.exports = ImportMetaContextDependency;
Note: See TracBrowser for help on using the repository browser.