Skip to content

Commit

Permalink
fix: adds missing config to babel plugin to parse flow (#216)
Browse files Browse the repository at this point in the history
  • Loading branch information
Madou authored Jun 10, 2020
1 parent 6370dfe commit 224c703
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/babel-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
3 changes: 2 additions & 1 deletion packages/babel-plugin/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 224c703

Please sign in to comment.