Skip to content

Commit 951e58a

Browse files
youknowriaddmsnell
authored andcommitted
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. git-svn-id: https://develop.svn.wordpress.org/trunk@61673 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 5b0105a commit 951e58a

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

tools/gutenberg/build-gutenberg.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,10 +145,10 @@ async function main() {
145145
// On Unix, arguments are passed directly without shell parsing
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
} );
154154

tools/gutenberg/copy-gutenberg-build.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ const COPY_CONFIG = {
3939
// PHP infrastructure files (to wp-includes/build/)
4040
phpInfrastructure: {
4141
destination: 'build',
42-
files: [ 'routes.php', 'pages.php' ],
42+
files: [ 'routes.php', 'pages.php', 'constants.php' ],
4343
directories: [ 'pages', 'routes' ],
4444
},
4545

0 commit comments

Comments
 (0)