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

WordPress Trac noreply at wordpress.org
Wed Jan 29 06:48:34 UTC 2020


#48154: Build Tools: Integrate DependencyExtractionWebpackPlugin in the JS build
-------------------------------------------------+-------------------------
 Reporter:  gziolo                               |       Owner:  gziolo
     Type:  enhancement                          |      Status:  reopened
 Priority:  normal                               |   Milestone:  5.4
Component:  Script Loader                        |     Version:  trunk
 Severity:  normal                               |  Resolution:
 Keywords:  dev-feedback needs-patch 2nd-        |     Focuses:  javascript
  opinion                                        |
-------------------------------------------------+-------------------------

Comment (by gziolo):

 Replying to [comment:34 pbearne]:
 > The patch in #49311 adds an additional file_exists() test for the PHP
 files and sets defaults for if a file is missing
 >
 > The question is can assume that the JS exists if the find the PHP file
 and only have one test not two as a performance saving

 PHP file is created by Webpack in the same task which output JS build
 file. A separate task moves PHP asset files to a different location. In
 the previous implementation (before PHP assets were introduced), there was
 no check for the existence of JS file. It wasn't raised as an issue for
 nearly 2 years so I assume you could skip the check for JS file as it must
 be handled in the script registration logic. It needs to be confirmed
 though.

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


More information about the wp-trac mailing list