Skip to content

Commit dc132c9

Browse files
authored
Update react-refresh plugin instructions to run on development only
React Refresh only works on development and throws on any other environment. It's currently making `yarn build` fail. Ref: facebook/react#15939
1 parent afa8930 commit dc132c9

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

packages/plugin-react-refresh/README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,13 @@ In addition, you have to add `react-refresh/babel` as a plugin to your babel con
1818
```js
1919
// babel.config.json
2020
{
21-
"plugins": [
22-
"react-refresh/babel"
23-
]
21+
"env": {
22+
"development": {
23+
"plugins": [
24+
"react-refresh/babel"
25+
]
26+
}
27+
}
2428
}
2529
```
2630

0 commit comments

Comments
 (0)