Skip to content
This repository has been archived by the owner on Mar 4, 2019. It is now read-only.

[RN 0.39] JS updates not picked up by react packager #78

Open
vikeri opened this issue Dec 6, 2016 · 3 comments
Open

[RN 0.39] JS updates not picked up by react packager #78

vikeri opened this issue Dec 6, 2016 · 3 comments

Comments

@vikeri
Copy link
Contributor

vikeri commented Dec 6, 2016

When I updated to RN 0.39.0 my changes in the code are not visible anymore, this is probably the issue: facebook/react-native#11301

A possible solution would be to not have the compiled js files being written to node_modules, not sure if that would affect other parts of the build system though.

@vikeri vikeri changed the title JS updates not picked up by react packager [RN 0.39] JS updates not picked up by react packager Dec 6, 2016
@vikeri
Copy link
Contributor Author

vikeri commented Dec 28, 2016

Latest update, I have now very crudely changed the folder from node_modules to cljs_output and then replaced goog.require(' with require(./cljs_output/'. This adds about 450ms in build time for the example project 😞. But at least it seems to work with 0.39. Going to polish it a bit and then I'll submit a PR. A positive outcome of this is that the patch-rn script is not needed anymore 👍

@vikeri
Copy link
Contributor Author

vikeri commented Mar 20, 2017

Investigated this with RN 0.42. The packager now seems to notice that the cljs files are updated, but those changes aren't shown in the final js-bundle. I’m going back to the approach of rewriting the file to add the normal require statement, see #84 . This will break hot-reload, but it doesn’t work very robustly for us anyway. If I would have had more time I’d investigated how the dependency tree is calculated by the react-packager and tried to feed the Closure dependency tree to that packager, which ideally would have made the step of copying all files to node_modules obsolete (that step is required for react-packager find those files and include them in the js-bundle).

@vikeri
Copy link
Contributor Author

vikeri commented Mar 20, 2017

For a version that works with RN 0.42 but boot-reload is broken: https://github.com/vikeri/boot-react-native/tree/rn42

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant