Make WordPress Core

Changeset 61673


Ignore:
Timestamp:
02/18/2026 01:18:53 PM (3 months ago)
Author:
youknowriad
Message:

Build: Fix Gutenberg copy script for font library admin page.

The Gutenberg build copy script was missing constants.php from its list of
PHP infrastructure files, causing a fatal error on the Font Library admin page.
Additionally, the --base-url argument was missing a trailing slash inside the
includes_url() call, resulting in malformed asset URLs.

Also renames the --fast build flag to --skip-types to match the current
Gutenberg build script option.

Props youknowriad, ellatrix, dd32, westonruter, desrosj.
Fixes #64656.

Location:
trunk/tools/gutenberg
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/gutenberg/build-gutenberg.js

    r61492 r61673  
    146146        const baseUrlArg =
    147147            process.platform === 'win32'
    148                 ? '--base-url="includes_url( \'build\' )"'
    149                 : "--base-url=includes_url( 'build' )";
     148                ? '--base-url="includes_url( \'build/\' )"'
     149                : "--base-url=includes_url( 'build/' )";
    150150
    151         await exec( 'npm', [ 'run', 'build', '--', '--fast', baseUrlArg ], {
     151        await exec( 'npm', [ 'run', 'build', '--', '--skip-types', baseUrlArg ], {
    152152            cwd: gutenbergDir,
    153153        } );
  • trunk/tools/gutenberg/copy-gutenberg-build.js

    r61605 r61673  
    4040    phpInfrastructure: {
    4141        destination: 'build',
    42         files: [ 'routes.php', 'pages.php' ],
     42        files: [ 'routes.php', 'pages.php', 'constants.php' ],
    4343        directories: [ 'pages', 'routes' ],
    4444    },
Note: See TracChangeset for help on using the changeset viewer.