Skip to content

Commit

Permalink
Remove react-refesh re-export from metro-runtime, reduce it to a …
Browse files Browse the repository at this point in the history
…dev dependency

Summary:
This removes the unused module `fast-refresh` from `metro-runtime`, removing our dependency on `react-refresh`.

`fast-refresh` is unused anywhere as far as I can tell, but as other modules in `metro-runtime/src/module` are designed to be imported by consumers using subpaths, I'd regard this as a breaking change.

(In general, only exports from module entry points, or explicit `package.json#exports` are considered part of Metro's public API)

```
* **[Breaking]:** Remove `metro-runtime/src/modules/fast-refresh` and `react-refresh` dependency - now owned by RN's Babel preset.
```

Reviewed By: huntie

Differential Revision: D49500556

fbshipit-source-id: 842bd84cfde44b2d27e58e6e7d568248cf38eb34
  • Loading branch information
robhogan authored and facebook-github-bot committed Sep 24, 2023
1 parent 9cfbeab commit 8557968
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
4 changes: 2 additions & 2 deletions packages/metro-runtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
},
"license": "MIT",
"dependencies": {
"@babel/runtime": "^7.0.0",
"react-refresh": "^0.14.0"
"@babel/runtime": "^7.0.0"
},
"devDependencies": {
"@babel/core": "^7.20.0",
"react": "^18.2.0",
"react-refresh": "^0.14.0",
"react-test-renderer": "^18.2.0"
},
"engines": {
Expand Down
11 changes: 0 additions & 11 deletions packages/metro-runtime/src/modules/fast-refresh.js

This file was deleted.

0 comments on commit 8557968

Please sign in to comment.