[wp-trac] [WordPress Trac] #48154: Build Tools: Integrate DependencyExtractionWebpackPlugin in the JS build
WordPress Trac
noreply at wordpress.org
Thu Mar 12 08:23:16 UTC 2020
#48154: Build Tools: Integrate DependencyExtractionWebpackPlugin in the JS build
-------------------------------------+-------------------------
Reporter: gziolo | Owner: gziolo
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: 5.5
Component: Build/Test Tools | Version:
Severity: normal | Resolution:
Keywords: needs-patch 2nd-opinion | Focuses: javascript
-------------------------------------+-------------------------
Comment (by gziolo):
Replying to [comment:79 peterwilsoncc]:
> In [attachment:"48154-update-file-check.diff"] I've modified the file
looked for to determine if a site has been built when running from the
WordPress-develop repo.
>
> Without `wp-includes/assets/script-loader-packages.php`, the JavaScript
can not be run (no dependency array) and as it's generated during the
build processes the remaining instructions in `/src/index.php` are enough.
It's a great idea to update code this way if you decide to ignore the `wp-
includes/assets` folder again.
> Also thinking it can perhaps do a Grunt `clean` of `/src/wp-
includes/assets/**` before running Webpack in dev mode. This will help by
deleting left-over old and unversioned files there (not strictly necessary
but nice to have?).
This proposal from @azaozz is also worth considering to ensure that all
files generated earlier get removed. It would also accommodate future
changes that we discussed like having one asset file for development and
one for production.
There is one consideration to take into account that might actually be
covered with the updated check that detects whether JS build was executed.
We need to ensure that PHPUnit tests pass without JS build files.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/48154#comment:81>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list