diff --git a/packages/babel-plugin/package.json b/packages/babel-plugin/package.json index 20e6956b2..c7ffc0cf3 100644 --- a/packages/babel-plugin/package.json +++ b/packages/babel-plugin/package.json @@ -20,12 +20,12 @@ ], "dependencies": { "@babel/core": "^7.9.0", + "@babel/plugin-syntax-jsx": "^7.8.3", "@babel/plugin-transform-flow-strip-types": "^7.8.3", "@compiled/ts-transform-css-in-js": "0.4.5", "typescript": "^3.7.3" }, "devDependencies": { - "@babel/plugin-syntax-jsx": "^7.8.3", "@types/babel__core": "^7.1.7" } } diff --git a/packages/babel-plugin/src/index.tsx b/packages/babel-plugin/src/index.tsx index 580990064..cdb1c64f7 100644 --- a/packages/babel-plugin/src/index.tsx +++ b/packages/babel-plugin/src/index.tsx @@ -34,7 +34,8 @@ export default function compiledBabelPlugin(_: any, opts: TransformerOptions = { parsedCode = transformSync(parsedCode, { babelrc: false, - plugins: ['@babel/plugin-transform-flow-strip-types'], + configFile: false, + plugins: ['@babel/plugin-syntax-jsx', '@babel/plugin-transform-flow-strip-types'], })?.code || parsedCode; }