source: trip-planner-front/node_modules/webpack/lib/cache/AddBuildDependenciesPlugin.js@ 1ad8e64

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

initial commit

  • Property mode set to 100644
File size: 716 bytes
RevLine 
[6a3a178]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("../Compiler")} Compiler */
9
10class AddBuildDependenciesPlugin {
11 /**
12 * @param {Iterable<string>} buildDependencies list of build dependencies
13 */
14 constructor(buildDependencies) {
15 this.buildDependencies = new Set(buildDependencies);
16 }
17
18 /**
19 * Apply the plugin
20 * @param {Compiler} compiler the compiler instance
21 * @returns {void}
22 */
23 apply(compiler) {
24 compiler.hooks.compilation.tap(
25 "AddBuildDependenciesPlugin",
26 compilation => {
27 compilation.buildDependencies.addAll(this.buildDependencies);
28 }
29 );
30 }
31}
32
33module.exports = AddBuildDependenciesPlugin;
Note: See TracBrowser for help on using the repository browser.