/
githubmirror
/
webpack
Обзор
Документация
Войти
/
githubmirror
/
webpack
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
test/statsCases/define-plugin-error/test.config.js
23 строки
496 B
Alexander Akait
fix: name the failing key on DefinePlugin typeof eval errors (#21503)
25 июл 2026, 18:09
Не верифицирован
25 июл 2026, 18:09
e02f566
Код
Авторство
О чём код?
"use strict"; module.exports = { /** * @param {import("../../../").Stats} stats stats */ validate(stats) { const { errors } = stats.toJson(); if (errors.length !== 1) { throw new Error(`expected exactly 1 error, got ${errors.length}`); } const { message } = errors[0]; if ( !message.includes( 'DefinePlugin: failed to evaluate value for "typeof PRODUCTION"' ) ) { throw new Error( `error should name the failing define key, got: ${message}` ); } } };