/
githubmirror
/
webpack
Обзор
Документация
Войти
/
githubmirror
/
webpack
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
test/configCases/css/runtime-data-webpack/webpack.config.js
42 строки
854 B
Alexander Akait
style: set `arrowParens` to `true` (#19706)
16 июл 2025, 19:13
Не верифицирован
16 июл 2025, 19:13
703d9ac
Код
Авторство
О чём код?
"use strict"; /** @type {import("../../../../").Configuration} */ module.exports = { target: "web", mode: "development", output: { uniqueName: "test" }, plugins: [ { apply(compiler) { compiler.hooks.compilation.tap("Test", (compilation) => { compilation.hooks.processAssets.tap( { name: "Test", stage: compiler.webpack.Compilation.PROCESS_ASSETS_STAGE_OPTIMIZE_SIZE }, (assets) => { const name = "bundle0.css"; const code = /** @type {string} */ (assets[name].source()); compilation.updateAsset( name, new compiler.webpack.sources.RawSource( `${code.replace( "head{", ".class, head, body{" )}\n\n.after-head { color: red; }` ) ); } ); }); } } ], experiments: { css: true } };