I've tried your code and works fine in my current configuration.
I've had other issues similar to your question and in those cases you can try to compile and load the secondfile.cljs
into the brepl before you try to compile and load the main.cljs
. In this case, this trick works fine.
Maybe the problem is that the secondfile.cljs
(and the def my-var
) didn't exist before the cljsbuild compilation, so when you tried to use this my-var
this code wasn't available
I hope this helps you
Juan