Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Revert "Fix dev script path handling on Windows"
This reverts commit bedda6a.
  • Loading branch information
Saulius Vikerta authored and cbravobernal committed Jun 17, 2026
commit 856ee91499df12544ffe554e5f66ea81c29c6a88
12 changes: 7 additions & 5 deletions tools/build-scripts/dev.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
/**
* External dependencies
*/
import { execSync } from 'child_process';
import spawn from 'cross-spawn';
import { execSync, spawn } from 'child_process';
import { fileURLToPath } from 'url';
import path from 'path';
import fs from 'fs';
Expand All @@ -29,6 +28,7 @@ function exec( command, args = [], options = {} ) {
const childOptions = {
cwd: ROOT_DIR,
stdio: silent ? 'pipe' : 'inherit',
shell: true,
...spawnOptions,
};

Expand Down Expand Up @@ -89,6 +89,7 @@ function execAsync( command, args = [], options = {} ) {
return spawn( command, args, {
cwd: ROOT_DIR,
stdio: 'inherit',
shell: true,
...options,
} );
}
Expand Down Expand Up @@ -157,7 +158,7 @@ async function dev() {

// This must happen before TypeScript compilation because some packages
// (like vips) have source files that import from generated worker-code.ts
await exec( process.execPath, [
await exec( 'node', [
path.join( __dirname, 'packages/generate-worker-placeholders.mjs' ),
] );

Expand All @@ -173,15 +174,15 @@ async function dev() {
console.log( ` ✔ Built TypeScript types (${ buildTime }ms)` );

console.log( '\n✅ Checking type declaration files...' );
await exec( process.execPath, [
await exec( 'node', [
path.join(
__dirname,
'packages/check-build-type-declaration-files.cjs'
),
] );

console.log( '\n📦 Building vendor files...' );
await exec( process.execPath, [
await exec( 'node', [
path.join( __dirname, 'packages/build-vendors.mjs' ),
] );

Expand Down Expand Up @@ -209,6 +210,7 @@ async function dev() {
const buildWatch = spawn( 'wp-build', [ '--watch' ], {
cwd: ROOT_DIR,
stdio: [ 'inherit', 'pipe', 'inherit' ],
shell: true,
env: { ...process.env, NODE_ENV: 'development' },
} );

Expand Down