/
githubmirror
/
webpack
Обзор
Документация
Войти
/
githubmirror
/
webpack
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
test/configCases/optimization/minimize-javascript-options/test.config.js
20 строк
512 B
Alexander Akait
feat: configure or exclude each asset type's minifier via optimization.minimize (#21663)
10 авг 2026, 18:37
Не верифицирован
10 авг 2026, 18:37
5a8fa6c
Код
Авторство
О чём код?
"use strict"; const fs = require("fs"); const path = require("path"); module.exports = { findBundle() { return ["bundle0.js"]; }, afterExecute(options) { const bundle = fs.readFileSync( path.join(options.output.path, "bundle0.js"), "utf8" ); // The minimizer ran (comments are dropped), but with the configured // options: `mangle: false` keeps the authored name. expect(bundle).toContain("importantMarkerValue"); expect(bundle).not.toContain("comment marker the minifier drops"); } };