From 375e2d8f337293d8162672ea2ab004b1bf178cc0 Mon Sep 17 00:00:00 2001 From: Lauren Tan Date: Tue, 5 Sep 2023 12:08:01 -0400 Subject: [PATCH] [babel] Remove babel/plugin-syntax-jsx Internal version of babel/core doesn't support the `inherits` property, so let's try removing it. The tests still seem to pass, so this might be vestigial from the first iteration of the compiler from last year --- compiler/packages/babel-plugin-react-forget/package.json | 1 - .../packages/babel-plugin-react-forget/src/Babel/BabelPlugin.ts | 2 -- 2 files changed, 3 deletions(-) diff --git a/compiler/packages/babel-plugin-react-forget/package.json b/compiler/packages/babel-plugin-react-forget/package.json index 3786e6252b..cb201d5c50 100644 --- a/compiler/packages/babel-plugin-react-forget/package.json +++ b/compiler/packages/babel-plugin-react-forget/package.json @@ -28,7 +28,6 @@ }, "dependencies": { "@babel/generator": "7.2.0", - "@babel/plugin-syntax-jsx": "^7.18.6", "@babel/types": "^7.19.0", "chalk": "4", "invariant": "^2.2.4", diff --git a/compiler/packages/babel-plugin-react-forget/src/Babel/BabelPlugin.ts b/compiler/packages/babel-plugin-react-forget/src/Babel/BabelPlugin.ts index 6fac2035fe..37ff800602 100644 --- a/compiler/packages/babel-plugin-react-forget/src/Babel/BabelPlugin.ts +++ b/compiler/packages/babel-plugin-react-forget/src/Babel/BabelPlugin.ts @@ -8,7 +8,6 @@ /// import type * as BabelCore from "@babel/core"; -import jsx from "@babel/plugin-syntax-jsx"; import { compileProgram, parsePluginOptions } from "../Entrypoint"; /** @@ -21,7 +20,6 @@ export default function ReactForgetBabelPlugin( ): BabelCore.PluginObj { return { name: "react-forget", - inherits: jsx, visitor: { // Note: Babel does some "smart" merging of visitors across plugins, so even if A is inserted // prior to B, if A does not have a Program visitor and B does, B will run first. We always