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 (facebook#1024)

Summary:
Pull Request resolved: facebook#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: 0849ff96c292284a8f7766c6f21a9bf714032601
  • Loading branch information
dmytrorykun authored and facebook-github-bot committed Jul 25, 2023
1 parent 12c88a0 commit afea8f6
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 afea8f6

Please sign in to comment.