/
githubmirror
/
webpack
Обзор
Документация
Войти
/
githubmirror
/
webpack
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
test/configCases/html/output-html-css/webpack.config.js
36 строк
855 B
Alexander Akait
feat(html): generate output.html for entrypoints with dependOn support (#21215)
18 июн 2026, 23:04
Не верифицирован
18 июн 2026, 23:04
868209f
Код
Авторство
О чём код?
"use strict"; const fs = require("fs"); const path = require("path"); const webpack = require("../../../../"); /** @type {import("../../../../").WebpackPluginInstance} */ const copyTest = { apply(compiler) { compiler.hooks.compilation.tap("Test", (compilation) => { compilation.hooks.processAssets.tap( { name: "copy-test", stage: compiler.webpack.Compilation.PROCESS_ASSETS_STAGE_ADDITIONAL }, () => { compilation.emitAsset( "test.js", new webpack.sources.RawSource( fs.readFileSync(path.resolve(__dirname, "test.js")) ) ); } ); }); } }; /** @type {import("../../../../").Configuration} */ module.exports = { target: "web", entry: { styles: "./src/styles.css" }, output: { filename: "[name].js", html: true }, experiments: { html: true, css: true }, plugins: [copyTest] };