/
githubmirror
/
webpack
Обзор
Документация
Войти
/
githubmirror
/
webpack
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
v5.102.0
test/helpers/applyPluginWithOptions.js
16 строк
521 B
Alexander Akait
chore: resolve "use strict" TODO (#19705)
16 июл 2025, 17:29
Не верифицирован
16 июл 2025, 17:29
d8690f3
Код
Авторство
О чём код?
"use strict"; const PluginEnvironment = require("./PluginEnvironment"); module.exports = function applyPluginWithOptions(Plugin) { // eslint-disable-next-line prefer-rest-params const plugin = new (Function.prototype.bind.apply(Plugin, arguments))(); const pluginEnvironment = new PluginEnvironment(); plugin.apply(pluginEnvironment.getEnvironmentStub()); const env = this === global ? {} : this; env.plugin = plugin; env.pluginEnvironment = pluginEnvironment; return pluginEnvironment.getEventBindings(); };