From bf84059b9db0f57d2c649bb621c2449dda9cf869 Mon Sep 17 00:00:00 2001 From: Bruno Lemos Date: Fri, 19 Jun 2020 12:12:51 -0300 Subject: [PATCH] Update react-refresh plugin instructions to run on development only (#147) React Refresh only works on development and throws on any other environment. It's currently making `yarn build` fail. Ref: https://github.com/facebook/react/pull/15939 --- packages/plugin-react-refresh/README.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/packages/plugin-react-refresh/README.md b/packages/plugin-react-refresh/README.md index 623f0e8..9aab1eb 100644 --- a/packages/plugin-react-refresh/README.md +++ b/packages/plugin-react-refresh/README.md @@ -18,9 +18,13 @@ In addition, you have to add `react-refresh/babel` as a plugin to your babel con ```js // babel.config.json { - "plugins": [ - "react-refresh/babel" - ] + "env": { + "development": { + "plugins": [ + "react-refresh/babel" + ] + } + } } ```