Skip to content

Commit dc64f29

Browse files
test: pin turnkey runner cwd to the example dir
The in-process modes (external, detect) create the dev server directly, and the plugin's server-function filter resolves its relative include glob against process.cwd() — from the repo root the glob missed every module, so the client transform never ran and external/sf failed. Spawned modes always passed explicit cwds; now the in-process ones match. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent d3c7875 commit dc64f29

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

examples/turnkey/test/run.mjs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,11 @@ import {
8888
} from 'vite';
8989

9090
const exampleDir = path.dirname(path.dirname(fileURLToPath(import.meta.url)));
91+
// The in-process modes (external, detect) create the dev server here rather
92+
// than spawning the CLI, and the plugin's server-function filter resolves its
93+
// relative include glob against process.cwd() — pin it so the runner behaves
94+
// the same from any invocation directory (spawned modes pass explicit cwds).
95+
process.chdir(exampleDir);
9196
const CHROME = '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome';
9297
const CDP_PORT = 9337;
9398

0 commit comments

Comments
 (0)