From 9ef755773028ed03bf28e27ed3ae057ff86c9ea3 Mon Sep 17 00:00:00 2001 From: Lauren Tan Date: Sat, 11 May 2024 00:20:02 -0400 Subject: [PATCH] [healthcheck] Don't compile mjs ghstack-source-id: 087985cd23baeefc0e2fb9478cd9a162b4e2e023 Pull Request resolved: https://github.com/facebook/react-forget/pull/2959 --- .../react-compiler-healthcheck/src/checks/reactCompiler.ts | 2 +- .../react-compiler-healthcheck/src/checks/strictMode.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/packages/react-compiler-healthcheck/src/checks/reactCompiler.ts b/compiler/packages/react-compiler-healthcheck/src/checks/reactCompiler.ts index 1dc210bef8..b122a89a19 100644 --- a/compiler/packages/react-compiler-healthcheck/src/checks/reactCompiler.ts +++ b/compiler/packages/react-compiler-healthcheck/src/checks/reactCompiler.ts @@ -102,7 +102,7 @@ function compile(sourceCode: string, filename: string) { } catch {} } -const JsFileExtensionRE = /(js|ts|jsx|tsx|mjs)$/; +const JsFileExtensionRE = /(js|ts|jsx|tsx)$/; export default { run(source: string, path: string): void { diff --git a/compiler/packages/react-compiler-healthcheck/src/checks/strictMode.ts b/compiler/packages/react-compiler-healthcheck/src/checks/strictMode.ts index 8992eab5f6..49df1dd5e9 100644 --- a/compiler/packages/react-compiler-healthcheck/src/checks/strictMode.ts +++ b/compiler/packages/react-compiler-healthcheck/src/checks/strictMode.ts @@ -7,7 +7,7 @@ import chalk from "chalk"; -const JsFileExtensionRE = /(js|ts|jsx|tsx|mjs)$/; +const JsFileExtensionRE = /(js|ts|jsx|tsx)$/; const StrictModeRE = /\/; let StrictModeUsage = false;