[wp-trac] [WordPress Trac] #53192: Use hashed/deterministic moduleIDs in Webpack build.

WordPress Trac noreply at wordpress.org
Thu May 20 03:49:01 UTC 2021


#53192: Use hashed/deterministic moduleIDs in Webpack build.
------------------------------+-------------------------
 Reporter:  peterwilsoncc     |       Owner:  (none)
     Type:  defect (bug)      |      Status:  new
 Priority:  normal            |   Milestone:  5.7.3
Component:  Build/Test Tools  |     Version:  5.0
 Severity:  normal            |  Resolution:
 Keywords:  has-patch         |     Focuses:  javascript
------------------------------+-------------------------
Changes (by peterwilsoncc):

 * milestone:  Awaiting Review => 5.7.3


Comment:

 Putting this on 5.7.3 as I think it will be needed.

 I tested this locally by pointing WP Core's packages to the Gutenberg
 packages:
 * ran a build using the packages on Gutenberg `trunk`
 * added a random `import` and pretty meaningless change to the `block-
 editor` package
 * rebuilt gutenberg then core packages to see what changed in core
 * most files listed after `block-editor` in `package.json` changed in the
 build, but only the module IDs.
 * repeated the above process with this patch applied to WP Core
 * only the files with code changes showed as modified in the build, module
 IDs remained the same

 It also looks like the compressed files can change by way of module ID
 without the cache busting value changing in the `script-loader` file. It
 seems unlikely but possible this will cause problems if module IDs change
 without the cache been broken.

 @gziolo I know I shared the patch with you via DM in Slack but are you
 able to post any review notes here so we've got a public log?

 Reviews by others with build tools expertise would be most welcome too.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/53192#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list