babel-plugin-codegen icon indicating copy to clipboard operation
babel-plugin-codegen copied to clipboard

In React Native code generation happens only on restarting server with cleaning the cache

Open serhiipalash opened this issue 7 years ago • 2 comments

Hi @kentcdodds ! I use this plugin with Expo/React Native and it works great! One problem is that code regeneration happens only on restarting Metro packager with cleaning the cache, and never on file change. Do you have any idea why it works like this? Maybe you can point me on some article and I can create pr then. I am new with Babel plugins and would appreciate any help. Thanks!

serhiipalash avatar Dec 02 '18 10:12 serhiipalash

This issue is the same problem we're dealing with here: https://github.com/kentcdodds/babel-plugin-preval/issues/19

The fundamental issue is that babel doesn't allow us to indicate cache dependencies of one file to another: https://github.com/babel/babel/issues/8497

There's nothing we can do in this project to make that work I'm afraid.

Would you like to open a PR to add a note about this to the README please?

kentcdodds avatar Dec 03 '18 16:12 kentcdodds

Hey guys, firstly thanks @kentcdodds for this awesome package!

@serhiipalash mentioned cleaning the cache. What's the best way to clear out the babel cache and have changes take effect?

Thank you

TSMMark avatar Feb 21 '20 17:02 TSMMark