/
githubmirror
/
webpack
Обзор
Документация
Войти
/
githubmirror
/
webpack
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
v5.107.2
lib/cache/AddManagedPathsPlugin.js
41 строка
1 KB
Aviv Keller
refactor: add basic descriptions (#20787)
10 апр 2026, 18:52
Не верифицирован
10 апр 2026, 18:52
16857f0
Код
Авторство
О чём код?
/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; /** @typedef {import("../Compiler")} Compiler */ class AddManagedPathsPlugin { /** * Creates an instance of AddManagedPathsPlugin. * @param {Iterable<string | RegExp>} managedPaths list of managed paths * @param {Iterable<string | RegExp>} immutablePaths list of immutable paths * @param {Iterable<string | RegExp>} unmanagedPaths list of unmanaged paths */ constructor(managedPaths, immutablePaths, unmanagedPaths) { this.managedPaths = new Set(managedPaths); this.immutablePaths = new Set(immutablePaths); this.unmanagedPaths = new Set(unmanagedPaths); } /** * Applies the plugin by registering its hooks on the compiler. * @param {Compiler} compiler the compiler instance * @returns {void} */ apply(compiler) { for (const managedPath of this.managedPaths) { compiler.managedPaths.add(managedPath); } for (const immutablePath of this.immutablePaths) { compiler.immutablePaths.add(immutablePath); } for (const unmanagedPath of this.unmanagedPaths) { compiler.unmanagedPaths.add(unmanagedPath); } } } module.exports = AddManagedPathsPlugin;