Skip to content

Commit

Permalink
Add babel-plugin-codegen to babel.config.js for fabric (#32756)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #32756

Changelog: [internal] Add babel-plugin-codegen to babel.config.js for the new architecture support.

Reviewed By: motiz88

Differential Revision: D33053216

fbshipit-source-id: 97a1fd9c64972ac4831461b1b62d3a83aa3207cb
  • Loading branch information
sota000 authored and facebook-github-bot committed Dec 15, 2021
1 parent bfb8f63 commit 2098c89
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
"Libraries",
"LICENSE",
"local-cli",
"packages/babel-plugin-codegen",
"React-Core.podspec",
"react-native.config.js",
"react.gradle",
Expand Down Expand Up @@ -96,6 +95,7 @@
"@react-native-community/cli-platform-android": "^6.0.0",
"@react-native-community/cli-platform-ios": "^6.0.0",
"@react-native/assets": "1.0.0",
"@react-native/babel-plugin-codegen": "0.0.6",
"@react-native/normalize-color": "2.0.0",
"@react-native/polyfills": "2.0.0",
"abort-controller": "^3.0.0",
Expand Down
3 changes: 3 additions & 0 deletions packages/babel-plugin-codegen/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
"url": "git@github.com:facebook/react-native.git",
"directory": "packages/babel-plugin-codegen"
},
"files": [
"index.js"
],
"dependencies": {
"react-native-codegen": "*"
},
Expand Down
1 change: 1 addition & 0 deletions template/babel.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
module.exports = {
presets: ['module:metro-react-native-babel-preset'],
plugins: ['@react-native/babel-plugin-codegen'],
};
4 changes: 4 additions & 0 deletions template/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"devDependencies": {
"@babel/core": "^7.12.9",
"@babel/runtime": "^7.12.5",
"@react-native/babel-plugin-codegen": "0.0.6",
"@react-native-community/eslint-config": "^2.0.0",
"babel-jest": "^26.6.3",
"eslint": "^7.32.0",
Expand All @@ -25,5 +26,8 @@
},
"jest": {
"preset": "react-native"
},
"codegenConfig": {
"libraries": []
}
}

0 comments on commit 2098c89

Please sign in to comment.