Skip to content

Commit

Permalink
Move react-native-babel-transformer and react-native-babel-preset fro…
Browse files Browse the repository at this point in the history
…m Metro to React Native repo (#1024)

Summary:
Pull Request resolved: #1024

X-link: facebook/react-native#38228

Changelog: [General][Changed] - Move react-native-babel-transformer and react-native-babel-preset from Metro to React Native repo.

Metro Changelog:  **[Breaking]** - Remove `metro-react-native-babel-transformer` and `metro-react-native-babel-preset`, to be published as `react-native/metro-babel-transformer` and `react-native/babel-preset` instead.

This diff does the following:
- Move `metro/packages/metro-react-native-babel-preset` to `react-native/packages/react-native-babel-preset`.
- Rename `metro-react-native-babel-preset` package to `react-native/babel-preset`.
- Move `metro/packages/metro-react-native-babel-transformer` to `react-native/packages/react-native-babel-transformer`.
- Rename `metro-react-native-babel-transformer` package to `react-native/metro-babel-transformer`.
- Upadate dependencies.

Reviewed By: robhogan

Differential Revision: D46977466

fbshipit-source-id: d9d6d827aaad0bc83aad6102782c840e491f2cac
  • Loading branch information
dmytrorykun authored and facebook-github-bot committed Jul 27, 2023
1 parent 28c967c commit 7d7ca36
Show file tree
Hide file tree
Showing 20 changed files with 65 additions and 837 deletions.
2 changes: 1 addition & 1 deletion docs/ModuleAPI.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Similar to [`module.exports`](https://nodejs.org/api/modules.html#moduleexports)
We currently recommend the use of [`@babel/plugin-transform-modules-commonjs`](https://babeljs.io/docs/babel-plugin-transform-modules-commonjs) in Metro projects to support `import` and `export`.

:::note
In React Native projects that use `metro-react-native-babel-preset`, `import` and `export` are supported out of the box.
In React Native projects that use `@react-native/babel-preset`, `import` and `export` are supported out of the box.
:::

## `import()` (dynamic import)
Expand Down
6 changes: 0 additions & 6 deletions packages/metro-react-native-babel-preset/.npmignore

This file was deleted.

41 changes: 0 additions & 41 deletions packages/metro-react-native-babel-preset/README.md

This file was deleted.

67 changes: 0 additions & 67 deletions packages/metro-react-native-babel-preset/package.json

This file was deleted.

17 changes: 0 additions & 17 deletions packages/metro-react-native-babel-preset/src/configs/hmr.js

This file was deleted.

This file was deleted.

Loading

0 comments on commit 7d7ca36

Please sign in to comment.