[wp-trac] [WordPress Trac] #48154: Build Tools: Integrate DependencyExtractionWebpackPlugin in the JS build

WordPress Trac noreply at wordpress.org
Fri Feb 28 22:45:26 UTC 2020

#48154: Build Tools: Integrate DependencyExtractionWebpackPlugin in the JS build
 Reporter:  gziolo         |       Owner:  gziolo
     Type:  defect (bug)   |      Status:  reopened
 Priority:  normal         |   Milestone:  5.4
Component:  Script Loader  |     Version:
 Severity:  normal         |  Resolution:
 Keywords:  needs-patch    |     Focuses:  javascript
Changes (by azaozz):

 * keywords:  has-patch => needs-patch


 Replying to [comment:66 david.binda]:

 > looks like the r47380 did not really make it properly to the build

 Thanks for the ping. Yeah, good that it didn't happen before beta3.
 Happened because /build is ignored when building locally, but is under
 version control in the build repo.

 @dd32 @762e5e74 what would be the best way to fix this? Looking at Grunt,
 it cleans (empties) the /build dir every time before copying the files on
 every build, but that doesn't seem to work in the build repo. Shall I try
 to revert then delete these files directly in the build repo or is there a
 better way to do this?

 Looking at why this happened: `script-loader-packages.php` is slightly
 different depending on whether Webpack was run for "build" or "dev". My
 theory is that:
 - `/src/wp-includes/assets/script-loader-packages.php` was different than
 what's in the build repo.
 - After copying the WP files (which happens first when building) there
 were uncommitted changes in that file.
 - Then the assets.php file was generated again by Webpack and copied to
 `/build/wp-includes/assets/script-loader-packages.php`. However this
 version of the file was different than the file that was copied earlier as
 Webpack ran in "build" mode. So SVN "saw" a file with uncommitted changes
 being replaced by a file with more/other changes and went into conflict
 resolution mode.

 Seems this will happen again next time the WP packages are updated.

Ticket URL: <https://core.trac.wordpress.org/ticket/48154#comment:67>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform

More information about the wp-trac mailing list