Use native ts/esm support in deno

This commit is contained in:
Nathan Whitaker 2024-10-15 17:27:40 -07:00
parent a00e1c9c4b
commit 458e6c81fe
No known key found for this signature in database

View file

@ -347,8 +347,8 @@ export async function loadEmptyConfigForMergeReports() {
}
export function restartWithExperimentalTsEsm(configFile: string | undefined, force: boolean = false): boolean {
// Opt-out switch.
if (process.env.PW_DISABLE_TS_ESM)
// Opt-out switch. Default to disabled if running in Deno, which supports TS and ESM natively.
if (process.env.PW_DISABLE_TS_ESM || typeof process.versions.deno === 'string')
return false;
// There are two esm loader APIs: