feat: launch dsh source with native TypeScript

This commit is contained in:
imccyu
2026-07-28 23:06:27 +08:00
parent 5ea161fa68
commit db3b12a0f7
7 files changed
+274 -42

No files matched your search

+14
View File
@@ -0,0 +1,14 @@
/** Register source-only tsconfig paths resolution before a TypeScript entry loads. */
import { register } from 'node:module'
import { resolve } from 'node:path'
import { fileURLToPath } from 'node:url'
const tsconfigPath = process.env.TSX_TSCONFIG_PATH === undefined
? fileURLToPath(new URL('../tsconfig.json', import.meta.url))
: resolve(process.env.TSX_TSCONFIG_PATH)
register(new URL('../apps/cli/src/tsconfig-paths-loader.ts', import.meta.url), {
parentURL: import.meta.url,
data: { tsconfigPath },
})