Instruction for clearing cache does not work with react-native 0.57
mieszko4 opened this issue · 10 comments
This instruction:
{
"scripts": {
"start": "rm -rf ./node_modules/.cache/babel-loader && node index.js"
}
}
does not work with react-native 0.57
Is there any way to fix it in react-native?
As a workaround I read and tried to write comment in file that imports the .graphql
file to bust cache.
Also I believe this issue is related to evenchange4/graphql.macro#6
I had to rename files. I couldn't get the cache busted
doesn't work in basic node neither
rm -rf ./node_modules/.cache/@babel
helps at least fo babel-node
Thanks @oxyii. For any Expo users
expo start -c
does the trick in Expo SDK >= 33
Been fighting this one for a while, thank you.
When using dynamic import, modifying ". Graphql" will trigger recompilation! But static import will not!
SO!!!
Recommended:
import('gQLDir/GraphQLDemo.graphql');
OR
import('../../../graphQL/GraphQLDemo.graphql');
With the dynamic import I mentioned above, there is no need to use script commands to delete the cache.
Dynamic import is not always an option, is there any other workaround?