From e7d48d4299143a1ad078cf94d5dbcb65baaaec54 Mon Sep 17 00:00:00 2001 From: Arda TANRIKULU Date: Wed, 30 Oct 2024 18:33:47 +0300 Subject: [PATCH] fix(cli): ESM build --- .changeset/wicked-fireants-explode.md | 5 +++++ scripts/replace-import-meta-url-in-cjs.ts | 3 +++ 2 files changed, 8 insertions(+) create mode 100644 .changeset/wicked-fireants-explode.md diff --git a/.changeset/wicked-fireants-explode.md b/.changeset/wicked-fireants-explode.md new file mode 100644 index 0000000000000..ffe62f5d16309 --- /dev/null +++ b/.changeset/wicked-fireants-explode.md @@ -0,0 +1,5 @@ +--- +'@graphql-mesh/cli': patch +--- + +Fix ESM build diff --git a/scripts/replace-import-meta-url-in-cjs.ts b/scripts/replace-import-meta-url-in-cjs.ts index f475fcd5944e5..2e2cfa56f2fa5 100644 --- a/scripts/replace-import-meta-url-in-cjs.ts +++ b/scripts/replace-import-meta-url-in-cjs.ts @@ -16,6 +16,9 @@ const esm = 'import.meta.url'; }); for (const scriptPath of scriptPaths) { + if (scriptPath.includes('ts-artifacts')) { + continue; + } const script = path.join(__packages, scriptPath); const content = await fs.readFile(script, 'utf8'); if (!content.includes(esm)) {