/
githubmirror
/
webpack
Обзор
Документация
Войти
/
githubmirror
/
webpack
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
test/statsCases/details-error/webpack.config.js
23 строки
644 B
Alexander Akait
style: set `arrowParens` to `true` (#19706)
16 июл 2025, 19:13
Не верифицирован
16 июл 2025, 19:13
703d9ac
Код
Авторство
О чём код?
"use strict"; const { WebpackError } = require("../../../"); /** @type {import("../../../").Configuration[]} */ module.exports = [0, 1, 10, 2, 20, 11, 12, 13, 3, 30].map((n) => ({ name: `${n % 10} errors ${(n / 10) | 0} warnings`, mode: "development", output: { filename: `${n}.js` }, entry: "./index.js", plugins: [ (compiler) => { compiler.hooks.compilation.tap("Test", (compilation) => { const err = new WebpackError("Test"); err.details = "Error details"; for (let i = n % 10; i > 0; i--) compilation.errors.push(err); for (let i = (n / 10) | 0; i > 0; i--) compilation.warnings.push(err); }); } ] }));