source: imaps-frontend/node_modules/webpack/lib/SelfModuleFactory.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: 844 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/** @typedef {import("./ModuleFactory").ModuleFactoryCreateData} ModuleFactoryCreateData */
9/** @typedef {import("./ModuleFactory").ModuleFactoryResult} ModuleFactoryResult */
10/** @typedef {import("./ModuleGraph")} ModuleGraph */
11
12class SelfModuleFactory {
13 /**
14 * @param {ModuleGraph} moduleGraph module graph
15 */
16 constructor(moduleGraph) {
17 this.moduleGraph = moduleGraph;
18 }
19
20 /**
21 * @param {ModuleFactoryCreateData} data data object
22 * @param {function((Error | null)=, ModuleFactoryResult=): void} callback callback
23 * @returns {void}
24 */
25 create(data, callback) {
26 const module = this.moduleGraph.getParentModule(data.dependencies[0]);
27 callback(null, {
28 module
29 });
30 }
31}
32
33module.exports = SelfModuleFactory;
Note: See TracBrowser for help on using the repository browser.