Skip to content

Commit 6336d21

Browse files
style: keep the added comments within two lines
1 parent af0104e commit 6336d21

4 files changed

Lines changed: 8 additions & 12 deletions

File tree

‎lib/runtime/DefinePropertyGettersRuntimeModule.js‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,8 @@ class DefinePropertyGettersRuntimeModule extends HelperRuntimeModule {
3939
const compilation = /** @type {Compilation} */ (this.compilation);
4040
const { runtimeTemplate } = compilation;
4141
const fn = RuntimeGlobals.definePropertyGetters;
42-
// Only webpack itself emits the array form, so a build that emits none
43-
// cannot receive one and the branch reading it is dead. The object form
44-
// stays either way — see the webpack 6 note below.
42+
// Only webpack emits the array form, so a build emitting none cannot
43+
// receive one; the object form stays either way (see the note below).
4544
const withArray = this.runtimeRequirements.has(
4645
RuntimeGlobals.definePropertyGettersFromArray
4746
);

‎lib/runtime/GetChunkFilenameRuntimeModule.js‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,9 +185,8 @@ class GetChunkFilenameRuntimeModule extends RuntimeModule {
185185
const dynamicUrlChunks = new Set();
186186

187187
/**
188-
* Drops the empty string a leading placeholder leaves behind. Only when a
189-
* quoted operand ends the expression, so the `+` chain keeps yielding a
190-
* string rather than a bare chunk id.
188+
* Drops the dead empty string a leading placeholder leaves, only when a
189+
* quoted operand ends the expression so the `+` chain stays a string.
191190
* @param {string} expr concatenation expression
192191
* @returns {string} the expression without its dead empty string
193192
*/

‎test/configCases/runtime/define-property-getters-no-value-binding/webpack.config.js‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@
22

33
/** @type {import("../../../../").Configuration} */
44
module.exports = {
5-
// Production: the const-value optimization that feeds a value binding only
6-
// runs there. Minifying would rewrite the runtime the test reads, and
7-
// dropping unused exports would remove the `__webpack_require__.d` call.
5+
// Production: only there does the const-value optimization feed a value
6+
// binding. No minify or tree-shake: both rewrite what the test reads.
87
mode: "production",
98
devtool: false,
109
// Keep the real `__filename` so the test can read its own bundle.

‎test/configCases/runtime/define-property-getters-value-binding/webpack.config.js‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@
22

33
/** @type {import("../../../../").Configuration} */
44
module.exports = {
5-
// Production: the const-value optimization that feeds a value binding only
6-
// runs there. Minifying would rewrite the runtime the test reads, and
7-
// dropping unused exports would remove the `__webpack_require__.d` call.
5+
// Production: only there does the const-value optimization feed a value
6+
// binding. No minify or tree-shake: both rewrite what the test reads.
87
mode: "production",
98
devtool: false,
109
// Keep the real `__filename` so the test can read its own bundle.

0 commit comments

Comments
 (0)