/
githubmirror
/
webpack
Обзор
Документация
Войти
/
githubmirror
/
webpack
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
test/configCases/html/extract-split-chunks/webpack.config.js
37 строк
692 B
Alexander Akait
feat(html): add `module.generator.html.extract` option (#20979)
19 май 2026, 22:41
Не верифицирован
19 май 2026, 22:41
45a1bab
Код
Авторство
О чём код?
"use strict"; // Force the entry's heavy dependency into a separate chunk via // `optimization.splitChunks`. The extracted HTML must include a script tag // for the split-out vendor chunk in addition to the entry chunk so the // browser loads both. /** @type {import("../../../../").Configuration} */ module.exports = { output: { filename: "[name].js", chunkFilename: "[name].chunk.js" }, optimization: { chunkIds: "named", splitChunks: { cacheGroups: { vendor: { test: /vendor\.js$/, name: "vendor", chunks: "all", enforce: true } } } }, module: { generator: { html: { extract: true } } }, experiments: { html: true } };