/
githubmirror
/
webpack
Обзор
Документация
Войти
/
githubmirror
/
webpack
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
test/configCases/chunks-order/module/webpack.config.js
64 строки
1 KB
Xiao
fix: the `dependOn` chunk must be loaded before the common chunk (#20073)
03 ноя 2025, 16:12
Не верифицирован
03 ноя 2025, 16:12
45a775e
Код
Авторство
О чём код?
"use strict"; /** @type {import("../../../../types").Configuration[]} */ module.exports = [ { target: "node", entry: { "nested-shared": { import: "./nested-shared.js" }, shared: { dependOn: "nested-shared", import: "./shared.js?foo=bar" }, foo: { dependOn: "shared", import: "./foo.js" } }, output: { publicPath: "auto", filename: "[name].mjs", chunkFilename: "[name].[contenthash].mjs", cssChunkFilename: "[name].[contenthash].css", assetModuleFilename: "[name].[contenthash][ext][query]", library: { type: "module" } }, devtool: "source-map", module: { rules: [ { test: /\.txt$/, type: "asset/resource" }, { test: /\.png$/, loader: "file-loader", options: { name: "file-loader.[ext]" } } ] }, experiments: { css: true, outputModule: true }, optimization: { chunkIds: "named", splitChunks: { cacheGroups: { commons: { enforce: true, test: /dependency\.js$/, chunks: "initial" } } }, runtimeChunk: { name: (entrypoint) => `runtime~${entrypoint.name}` } } } ];