/
githubmirror
/
webpack
Обзор
Документация
Войти
/
githubmirror
/
webpack
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
test/configCases/plugins/define-plugin-runtime-value-errors/webpack.config.js
20 строк
560 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"; const webpack = require("../../../../"); /** @type {import("../../../../").Configuration} */ module.exports = { plugins: [ new webpack.DefinePlugin({ // generator throws an Error -> reported with the key, message chained "typeof FLAG": webpack.DefinePlugin.runtimeValue(() => { throw new Error("boom-error"); }), // generator throws a non-Error -> wrapped in a WebpackError "typeof MODE": webpack.DefinePlugin.runtimeValue(() => { // eslint-disable-next-line no-throw-literal throw "boom-string"; }) }) ] };