/
githubmirror
/
webpack
Обзор
Документация
Войти
/
githubmirror
/
webpack
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
test/configCases/plugins/progress-plugin/webpack.config.js
31 строка
874 B
Alexander Akait
style: set `arrowParens` to `true` (#19706)
16 июл 2025, 19:13
Не верифицирован
16 июл 2025, 19:13
703d9ac
Код
Авторство
О чём код?
"use strict"; const path = require("path"); const webpack = require("../../../../"); const data = require("./data"); /** @typedef {import("../../../../").ProgressPlugin} ProgressPlugin */ /** @type {import("../../../../").Configuration} */ module.exports = { externals: { data: `commonjs ${path.resolve(__dirname, "data.js")}` }, plugins: [ new webpack.ProgressPlugin((value, ...messages) => { data.push(messages.join("|")); }), { apply: (compiler) => { compiler.hooks.compilation.tap("CustomPlugin", (compilation) => { compilation.hooks.optimize.tap("CustomPlugin", () => { const reportProgress = /** @type {NonNullable<ReturnType<typeof webpack.ProgressPlugin['getReporter']>>} */ (webpack.ProgressPlugin.getReporter(compiler)); reportProgress(0, "custom category", "custom message"); }); }); } } ] };