Make WordPress Core


Ignore:
Timestamp:
09/23/2022 08:25:45 AM (22 months ago)
Author:
gziolo
Message:

Build: Improve how combined assets are generated

Allows to revert changes applied in [54277] - temporary workaround for the failing Test NPM CI check on Windows.

Improvements included:

  • generate combined asset files for both production and development
  • store in the repository only the production version of the combined assets for packages, we use everything else only in development
  • to make unit tests work, ensure that they ignore react fast refresh and use the production version of combined assets that are present in the source code

Props bernhard-reiter, jsnajdr, clorith, wildworks.
Fixes #56615.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/dependencies/scripts.php

    r54142 r54289  
    737737        $expected .= "<script type='text/javascript' id='test-example-js-before'>\nconsole.log(\"before\");\n</script>\n";
    738738        $expected .= "<script type='text/javascript' src='http://example.com' id='test-example-js'></script>\n";
    739         $expected .= "<script type='text/javascript' src='/wp-includes/js/dist/i18n{$suffix}.js' id='wp-i18n-js'></script>\n";
     739        $expected .= "<script type='text/javascript' src='/wp-includes/js/dist/i18n.min.js' id='wp-i18n-js'></script>\n";
    740740        $expected .= "<script type='text/javascript' id='wp-i18n-js-after'>\n";
    741741        $expected .= "wp.i18n.setLocaleData( { 'text direction\u0004ltr': [ 'ltr' ] } );\n";
    742742        $expected .= "</script>\n";
    743         $expected .= "<script type='text/javascript' src='/wp-includes/js/dist/a11y{$suffix}.js' id='wp-a11y-js'></script>\n";
     743        $expected .= "<script type='text/javascript' src='/wp-includes/js/dist/a11y.min.js' id='wp-a11y-js'></script>\n";
    744744        $expected .= "<script type='text/javascript' src='http://example2.com' id='test-example2-js'></script>\n";
    745745        $expected .= "<script type='text/javascript' id='test-example2-js-after'>\nconsole.log(\"after\");\n</script>\n";
Note: See TracChangeset for help on using the changeset viewer.