fix(server): tsx env check

This commit is contained in:
Kristaps Fabians Geikins
2025-08-04 13:45:58 +03:00
parent 3ff32d639d
commit 505df5b209
+2 -2
View File
@@ -5,8 +5,8 @@ import { fileURLToPath } from 'url'
const isTsMode =
!!process[Symbol.for('ts-node.register.instance')] ||
process.env.VITEST === 'true' ||
(process._preload_modules || []).some((m) => m.match(/node_modules\/tsx\//)) // tsx running ||
process.env.TSX === 'true'
process.env.TSX === 'true' ||
(process._preload_modules || []).some((m) => m.match(/node_modules\/tsx\//)) // tsx running
const __filename = fileURLToPath(import.meta.url)
const __dirname = path.dirname(__filename)