/
githubmirror
/
webpack
Обзор
Документация
Войти
/
githubmirror
/
webpack
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
test/configCases/split-chunks/custom-filename-function/webpack.config.js
35 строк
709 B
Alexander Akait
style: set `arrowParens` to `true` (#19706)
16 июл 2025, 19:13
Не верифицирован
16 июл 2025, 19:13
703d9ac
Код
Авторство
О чём код?
"use strict"; /** @typedef {import("../../../../").Chunk} Chunk */ /** @type {import("../../../../").Configuration} */ module.exports = { entry: { a: "./a", b: "./b" }, output: { filename: (data) => `${/** @type {Chunk} */ (data.chunk).name || /** @type {Chunk} */ (data.chunk).id}.js`, libraryTarget: "commonjs2" }, optimization: { chunkIds: "named", splitChunks: { cacheGroups: { shared: { chunks: "all", test: /shared/, filename: (data) => `shared-${/** @type {Chunk} */ (data.chunk).name || /** @type {Chunk} */ (data.chunk).id}.js`, enforce: true }, common: { chunks: "all", test: /common/, enforce: true } } } } };