Fork me on GitHub
#shadow-cljs
<
2018-04-09
>
troglotit16:04:34

Hi! How to debug release build of shadow-cljs? Development (watch command) works ok. Maybe I did miss important configurations? “Generating Production Code” chapter doesn’t include anything particular

troglotit16:04:40

The particular error is React is not defined

thheller16:04:02

this does not appear in watch?

troglotit16:04:34

yeap, in watch it works fine

thheller16:04:20

odd. what is your config?

thheller16:04:04

React isn't defined by shadow-cljs anywhere unless you are using cljsjs.react

thheller16:04:35

but if you use that there is no reason why it wouldn't work outside watch

troglotit08:04:45

but I’m using fulcro, without cljsjs.react

thheller08:04:05

did you try running shadow-cljs release your-app --debug? what is your full stacktrace when you get the React not found error?

troglotit08:04:23

it’s in routing.cljc file of fulcro in DynamicRouter declaration

alex-dixon16:04:25

@troglotit what version of shadow?

thheller16:04:26

@troglotit shadow-cljs release the-build --debug

briandunn22:04:22

Should shadow-cljs cljs-repl app work with: https://github.com/thheller/shadow-cljs-examples/tree/master/cljs-react-native-app ? I get No application has connected to the REPL server. Make sure your JS environment has loaded your compiled ClojureScript code. I have the code loaded and working in the iPhone Simulator via Expo. Is there another step to get the repl connected, or did I break something?

thheller07:04:03

cljs-repl for :npm-module is currently in a weird state. It doesn't really work due to the way the react-native packager works.

thheller07:04:20

I want to add proper support for React Native but didn't have time to work on it yet. https://github.com/thheller/shadow-cljs/issues/214