Update npm packages (73 packages including @jqhtml 2.3.36)
Update npm registry domain from privatenpm.hanson.xyz to npm.internal.hanson.xyz 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
6
node_modules/webpack/lib/optimize/MergeDuplicateChunksPlugin.js
generated
vendored
6
node_modules/webpack/lib/optimize/MergeDuplicateChunksPlugin.js
generated
vendored
@@ -11,6 +11,7 @@ const { runtimeEqual } = require("../util/runtime");
|
||||
|
||||
/** @typedef {import("../../declarations/plugins/optimize/MergeDuplicateChunksPlugin").MergeDuplicateChunksPluginOptions} MergeDuplicateChunksPluginOptions */
|
||||
/** @typedef {import("../Compiler")} Compiler */
|
||||
/** @typedef {import("../Chunk")} Chunk */
|
||||
|
||||
const validate = createSchemaValidation(
|
||||
require("../../schemas/plugins/optimize/MergeDuplicateChunksPlugin.check"),
|
||||
@@ -26,10 +27,11 @@ const PLUGIN_NAME = "MergeDuplicateChunksPlugin";
|
||||
|
||||
class MergeDuplicateChunksPlugin {
|
||||
/**
|
||||
* @param {MergeDuplicateChunksPluginOptions} options options object
|
||||
* @param {MergeDuplicateChunksPluginOptions=} options options object
|
||||
*/
|
||||
constructor(options = { stage: STAGE_BASIC }) {
|
||||
validate(options);
|
||||
/** @type {MergeDuplicateChunksPluginOptions} */
|
||||
this.options = options;
|
||||
}
|
||||
|
||||
@@ -48,11 +50,13 @@ class MergeDuplicateChunksPlugin {
|
||||
const { chunkGraph, moduleGraph } = compilation;
|
||||
|
||||
// remember already tested chunks for performance
|
||||
/** @type {Set<Chunk>} */
|
||||
const notDuplicates = new Set();
|
||||
|
||||
// for each chunk
|
||||
for (const chunk of chunks) {
|
||||
// track a Set of all chunk that could be duplicates
|
||||
/** @type {Set<Chunk> | undefined} */
|
||||
let possibleDuplicates;
|
||||
for (const module of chunkGraph.getChunkModulesIterable(chunk)) {
|
||||
if (possibleDuplicates === undefined) {
|
||||
|
||||
Reference in New Issue
Block a user