From d5a1cafd8c6c4cc7598bc61874ccc0037e0841cf Mon Sep 17 00:00:00 2001 From: Joe Haddad Date: Wed, 3 Oct 2018 08:08:28 -0400 Subject: [PATCH] Add CRA note to caveats https://github.com/facebook/create-react-app/issues/2730#issuecomment-426550137 We don't want users thinking they have to purge the cache, as this will be very detrimental to their rebuild speed. --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 97b367d..a3a3dfd 100644 --- a/README.md +++ b/README.md @@ -158,6 +158,8 @@ Are you trying to make your own macros that works with `babel-plugin-macros`? Go #### Babel cache problem +>**Note:** This issue is not present when used in Create React App. + Most of the time you'll probably be using this with the babel cache enabled in webpack to rebuild faster. If your macro function is **not pure** which gets different output with same code (e.g., IO side effects) it will cause recompile mechanism fail. Unfortunately you'll also experience this problem while developing your macro as well. If there's not a change to the source code that's being transpiled, then babel will use the cache rather than running your macro again. For now, to force recompile the code you can simply add a cache busting comment in the file: