[nexus] fix: use tsx/cli exports subpath instead of deep import (fixes ERR_PACKAGE_PATH_NOT_EXPORTED)

This commit is contained in:
Mikkel Georgsen 2026-03-31 12:04:43 +02:00
parent 4c8cfcd851
commit 2e7a273687

View file

@ -5,7 +5,7 @@ import { fileURLToPath } from "node:url";
import { resolveServerDevWatchIgnorePaths } from "../src/dev-watch-ignore.ts";
const require = createRequire(import.meta.url);
const tsxCliPath = require.resolve("tsx/dist/cli.mjs");
const tsxCliPath = require.resolve("tsx/cli"); // [nexus] use exports map subpath, not deep import
const serverRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
const ignoreArgs = resolveServerDevWatchIgnorePaths(serverRoot).flatMap((ignorePath) => ["--exclude", ignorePath]);