-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/v57 #192
Feature/v57 #192
Conversation
|
||
module.exports = { | ||
transform: customClojurescriptTransformer, | ||
projectRoot: projectRoot, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I get an error here (node:19615) UnhandledPromiseRejectionWarning: ReferenceError: projectRoot is not defined
This line should probably be projectRoot: rnCliConfig.projectRoot,
Thanks a lot for the work you are putting into this! I'm not sure about how to use the When do In the end, I got it working by adding this line to my
|
I don't know if it is intentional or not, but I noticed that the bundle file that results from calling To obtain a production js bundle, I added |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for this contribution! 🎉 I had some small issues before it worked on my machine, but it does work. I will test it a bit more and will merge. Thanks! 👍
@@ -131,7 +131,7 @@ ensureExecutableAvailable = (executable) -> | |||
exec "type #{executable}" | |||
|
|||
isYarnAvailable = () -> | |||
false | |||
exec 'yarn -v' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fails if there is no yarn:
Command failed: yarn -v
Leave it as false for now?
For the record, I finally found out the issue I had when bundling for production. It is caused by an optimization the metro bundler tries to apply to our minified/optimized main file. I've documented it here facebook/metro#291 |
I have doubts about the The fact that it solves the memory issue seems to rely solely on the manual garbage collection (that does run). I may have found a cleaner way: Babel has a way to declare that some files should simply be ignored. So if you use something like .re-natal, you can add this to your
This used to break the metro bundler, so you could not use it, but it has been fixed very recently through facebook/metro@66aa795 I have applied the patch locally on my node_modules, and I haven't run into memory issues since. Hopefully it will be available through the next release of react-native, or maybe someone knows how to force react-native to use more recent version of metro? |
@chpill react-native 0.57.3 has just been released and is using metro 0.48.1 I had to modify rn-cli.config.js slightly to get it working with newer versions of metro.
|
@chpill custom transformer indeed did not work before. The fix by @codonovan makes it work, but so far, at least on my MacBook I can't get it running. |
@drapanjanas I think that error is due to the regex at line 84 in rn-cli.config.js The first line in customClojurescriptTransformer. I changed it to
|
@codonovan @puppybits just to be clear, in the end I did not use any |
Is this update supposed to fix figwheel live reloading? It appears to be broken after update to RN 0.57.2 as well. I'm trying to figure out how to get it back. |
@codonovan i changed the code by your sugesstion, but the problem still here: |
@chpill thanks! I got the build working now without using cutom transformer. But now I have the problem figwheel does not reload files. REPL works fine, so I think it is not a general problem with connection. Do you experience that? Looks like |
@drapanjanas I'm not experiencing issues with hot-reloading using RN 57.0... That said I somewhat diverged from re-natal a while ago (I needed a single cljs build for both ios and android). So I miss a few improvements from the latest version, mainly: I am not yet using But I see that the other PR by @wnr includes a change in the fighweel-bridge file that may be relevant to you https://github.com/drapanjanas/re-natal/pull/193/files#diff-a27f34062e9e57b68e6346717e0db9e5. |
@drapanjanas - On slack @xfyre suggested "you shouldn’t upgrade Figwheel to a version older than 0.5.14 (you’ll lose live reloading)". I think this is the related figwheel issue bhauman/lein-figwheel#716 but @xfyre is in a better position to comment. |
@drapanjanas Great to see this merged! Is there any chance of a new npm release to include 0.57 support? |
@gtebbutt new npm version is published 😉 |
@drapanjanas we have waitted it for a long time, thanks a lot |
• Updated to react-native v0.57.0
• Upgraded lein and npm dependencies
• Added custom Metro Transformer for large Clojurescript compiled files to skip Babel transforms but still generate a sourcemap file.