Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit d5a1caf

Browse files
authoredOct 3, 2018
Add CRA note to caveats
facebook/create-react-app#2730 (comment) We don't want users thinking they have to purge the cache, as this will be very detrimental to their rebuild speed.
1 parent 1785a0f commit d5a1caf

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed
 

‎README.md

+2
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,8 @@ Are you trying to make your own macros that works with `babel-plugin-macros`? Go
158158

159159
#### Babel cache problem
160160

161+
>**Note:** This issue is not present when used in Create React App.
162+
161163
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.
162164

163165
For now, to force recompile the code you can simply add a cache busting comment in the file:

0 commit comments

Comments
 (0)
Please sign in to comment.