This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-09-17
Channels
- # beginners (51)
- # boot (31)
- # cider (14)
- # clara (13)
- # cljs-dev (15)
- # cljsjs (2)
- # cljsrn (53)
- # clojure (18)
- # clojure-dusseldorf (1)
- # clojure-russia (4)
- # clojure-uk (9)
- # clojurescript (53)
- # cursive (3)
- # datomic (5)
- # docs (1)
- # figwheel (2)
- # fulcro (42)
- # hoplon (3)
- # lein-figwheel (3)
- # leiningen (53)
- # off-topic (1)
- # om (4)
- # re-frame (11)
- # shadow-cljs (8)
holy smokes… has anyone run into this or a variation of? https://github.com/facebook/react-native/issues/15195
also: on a related note - has there been any discussion that I have missed re: GETTING RID OF packager/metro-bundler/whatever
I’m literally willing to put a few weeks of work myself to get this done… those things are beyond frustrating to use
some awesome finding https://github.com/drapanjanas/re-natal/issues/127
I've just tried this, but I end up getting an error while running the bundler. Unable to resolve module
react-navigation` from /home/jeaye/projects/lets-bet/client/index.android.js
: Module does not exist in the module map or in these directories:`
So, it looks like something is still looking in index.android.js
, even though I've changed my project.clj
to compile to cljs.android.js
.
Ah, looks like it's gradle. There are more changes needed in build.gradle
, for Android.
Ok, after that, I see this: TransformError: /home/jeaye/projects/lets-bet/client/cljs.android.js: Cannot read property 'tokens' of undefined
finally able to complete a production build in under 1-2 minutes! in 1+ year of React Native this is a first
figured out how to exclude the Google Closure output from the evil hands of metro-bundler/Babel 😂
Does RN affect ClojureScript's :preloads
at all? I haven't been to preload anything, unfortunately.
I have a simple ns with (ns me.dev) (.log js/console "something"))
and I've :preloads [me.dev]
in my leiningen project, in the cljsbuild :compiler
map. I see nothin'.
@raspasov That looks awesome; I'll give it a shot this week. Thanks so much for digging deeper into metro for it.
@jeaye I haven’t used :preloads myself - I’m reading the docs https://clojurescript.org/reference/compiler-options - is that something only for development? all my findings are mostly for production build (in RN there’s a difference between dev and production and you MUST compile for production otherwise your app is many times slower); luckily, I haven’t had many problems for dev builds with React Native, they have mostly worked, or at least much more so than when trying to get metro/babel to go through a few MB one file output under Google Closure :advanced (or even :simple - that might be even harder but I haven’t been using :simple or other Closure options in a while)
Yeah, the :preloads
issue is entirely separate from the Babel builds and all of that other nonsense.
I brought it up a few hours ago and only now just read about your progress on the Babel issue.
:preloads
is something that's only used in development and I'm looking to use it to help me trace events as they flow through re-frame. It uses preloads to hook some functions, but the preloading isn't working at all. When I've tried with a simple test ns, it also didn't work, so it might be something RN related.
right — so if it gets included in your final :advanced output such index.ios.js (or better my-unique-name.ios.js like I wrote for Babel-related reasons) it should not affect anything
We have :advanced
builds, for production, but :preloads
applies specifically to dev builds.
Everything I'm doing with :preloads
is with a dev build. It does nothing; the preloaded namespaces are never executed.
As I mentioned in my example above, I put a log to the JS console and it doesn't show up anywhere in logcat or the dev tools console.
My app works fine, in both debug and production. My logs work fine. I'm not talking about Babel or production builds. I'm just talking about :preloads
and CLJS and RN, as the combination itself doesn't appear to work.
got it… ok… I haven’t used those so I can’t comment then 🙂 wonder how :preloads really works, like how does it tell the browser/environment/etc to “preload” them
Well, CLJS compiled to JS, yeah. So (.log js/console "meow")
will be there, since you're in JS.
probably my understanding of how Google Closure/ClojureScript works is limited in this scenario 🙂