Skip to content

Commit 964979d

Browse files
style: keep the new comments within two lines
1 parent 5142c33 commit 964979d

2 files changed

Lines changed: 6 additions & 10 deletions

File tree

‎lib/RuntimeTemplate.js‎

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3302,15 +3302,12 @@ class RuntimeTemplate {
33023302
const chunks =
33033303
consumingChunks ||
33043304
this._moduleChunks(/** @type {Module} */ (consumingModule), chunkGraph);
3305-
// An id names the chunk in the stand-in. No reference reaches here without one —
3306-
// `blockPromise` drops an id-less chunk before asking, and one the whole build
3307-
// keeps has no name to be emitted under — so the guard carries no reason of its
3308-
// own; it only keeps `null` out of a name.
3305+
// An id names the chunk in the stand-in; `blockPromise` drops an id-less chunk
3306+
// before asking, so the guard only keeps `null` out of a name.
33093307
if (chunk.id === null) return null;
33103308
const canReserve = this._canDeferAnalyzableName(chunks);
3311-
// A content-named consumer bakes without repair when this chunk settles first:
3312-
// the fold puts the name into its hash. Only what `_foldsWholeName` covers,
3313-
// though, and a pair that reaches back has no fold order — the rest is repaired.
3309+
// A content-named consumer folds this name into its hash when it settles first;
3310+
// what the fold cannot cover is repaired instead.
33143311
const canFold = !canReserve && this._namesBeforeAll(chunk, chunks);
33153312
const filename = deferred
33163313
? ""

‎lib/optimize/RealContentHashPlugin.js‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -226,9 +226,8 @@ class RealContentHashPlugin {
226226
stage: Compilation.PROCESS_ASSETS_STAGE_OPTIMIZE_HASH
227227
},
228228
async () => {
229-
// Set by the deferred fill where a baked name landed in a chunk whose
230-
// hashed name would otherwise go stale. `[chunkhash]` is repaired only
231-
// then; elsewhere it keeps naming the modules, as documented.
229+
// Set by the deferred fill where a baked name would leave a hashed name
230+
// stale; only then is `[chunkhash]` repaired rather than left as named.
232231
const repairing = compilation.runtimeTemplate.needsAnalyzableRepair();
233232
if (this._onDemand && !repairing) return;
234233
const assets = compilation.getAssets();

0 commit comments

Comments
 (0)