diff --git a/tools/gutenberg/copy.js b/tools/gutenberg/copy.js index 02fcca9f5d76d..b3c4b7f9aa9ba 100644 --- a/tools/gutenberg/copy.js +++ b/tools/gutenberg/copy.js @@ -25,7 +25,11 @@ const gutenbergBuildDir = path.join( gutenbergDir, 'build' ); */ const args = process.argv.slice( 2 ); const buildDirArg = args.find( ( arg ) => arg.startsWith( '--build-dir=' ) ); -const buildTarget = 'src'; +const buildTarget = buildDirArg + ? buildDirArg.split( '=' )[ 1 ] + : args.includes( '--dev' ) + ? 'src' + : 'build'; const wpIncludesDir = path.join( rootDir, buildTarget, 'wp-includes' );