File tree Expand file tree Collapse file tree
define-property-getters-no-value-binding
define-property-getters-value-binding Expand file tree Collapse file tree Original file line number Diff line number Diff 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 ) ;
Original file line number Diff line number Diff 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 */
Original file line number Diff line number Diff line change 22
33/** @type {import("../../../../").Configuration } */
44module . 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.
Original file line number Diff line number Diff line change 22
33/** @type {import("../../../../").Configuration } */
44module . 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.
You can’t perform that action at this time.
0 commit comments