/
githubmirror
/
webpack
Обзор
Документация
Войти
/
githubmirror
/
webpack
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
test/configCases/css/insert-plugin/webpack.config.js
31 строка
651 B
Alexander Akait
test: add missing CSS test cases inspired by css-loader and mini-css-extract-plugin (#20914)
05 май 2026, 20:57
Не верифицирован
05 май 2026, 20:57
959e210
Код
Авторство
О чём код?
"use strict"; const webpack = require("../../../../"); /** @type {import("../../../../").Configuration} */ module.exports = { target: "web", output: { chunkFilename: "[name].chunk.js" }, optimization: { chunkIds: "named" }, plugins: [ (compiler) => { compiler.hooks.thisCompilation.tap("InsertPluginTest", (compilation) => { const hooks = webpack.web.CssLoadingRuntimeModule.getCompilationHooks(compilation); hooks.createStylesheet.tap( "InsertPluginTest", (source) => `${source}\nlink.setAttribute("data-insert-marker", "via-create-stylesheet");` ); }); } ], experiments: { css: true } };