Fork me on GitHub
#cljsrn
<
2017-10-27
>
yenda08:10:04

Is there a way to specify code that has to be at the top of the index.js file ? I would like to import shim.js there to use node modules in the react-native app

pesterhazy10:10:06

Isn't that precisely what re-natal does?

yenda11:10:03

I changed re-natal.coffee line 756 for

fs.writeFileSync "index.#{platform}.js", "import './shim';#{moduleMap}require('figwheel-bridge').withModules(modules).start('#{projName}','#{platform}','#{devHost[platform]}');"

yenda11:10:24

@pesterhazy it does require modules but rn-nodeify readme states The first line in index.ios.js / index.android.js should be to import it (NOT require it!), my change is useless because re-natal.coffee is in the node_modules, so changes are wiped when I make a clean install. As far as I can tell there is no easy way to add something to index.js

jeaye16:10:31

As per the last comment there, I've been able to shim some namespaces in.

yenda17:10:46

Maybe I misunderstand but isn't it for dev-dependencies and only apply when using figwheel-bridge ?

sam1618:10:58

Guys is there a way to integrate re-frame-trace with cljs-expo so that we can monitor app state even while developing for react-native apps. @mikethompson

danielneal18:10:14

Not as far as i know but re frisk remote will work @sam16