diff --git a/src/detect.ts b/src/detect.ts index 0184c9f..c963eca 100644 --- a/src/detect.ts +++ b/src/detect.ts @@ -79,6 +79,11 @@ let _isNativeTsImportSupported: boolean | undefined export async function isNativeTsImportSupported(): Promise { if (_isNativeTsImportSupported === undefined) { + // @ts-expect-error missing `typescript` property + // eslint-disable-next-line node/prefer-global/process + if (typeof process !== 'undefined' && process.features?.typescript) { + return _isNativeTsImportSupported = true + } try { const modName = 'dummy.mts' const mod = await import(`../runtime-fixtures/${modName}`)