From 9b2609719e3312d7b36c9f6abcdadc036c733ab3 Mon Sep 17 00:00:00 2001 From: SarahIsWeird Date: Tue, 18 Feb 2025 16:42:05 +0100 Subject: [PATCH] Fix `declare` breaking babel --- src/processScript/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/processScript/index.ts b/src/processScript/index.ts index 4464494..2bbe1d2 100644 --- a/src/processScript/index.ts +++ b/src/processScript/index.ts @@ -184,7 +184,7 @@ export async function processScript(code: string, { filePathResolved = getRelativePath(`.`, filePath) if (filePath.endsWith(`.ts`)) { - plugins.push([ + plugins.unshift([ (await import(`@babel/plugin-transform-typescript`)), { allowDeclareFields: true, optimizeConstEnums: true } ]) -- knotmirror 0.0.1