Fork me on GitHub
#shadow-cljs
<
2019-05-09
>
thheller07:05:55

@enn you are using it incorrectly. just use :exports {:handler foo/handler}

thheller07:05:38

:exports-var would be :exports-var foo/exports and then in (ns foo) (def exports #js {:handler handler})

enn13:05:03

@thheller I actually started with :exports. I see the same error.

thheller13:05:47

@enn there seems to be something doing a (js/require "foo")?

enn13:05:23

Yes, some part of the AWS Lambda machinery I imagine. But I don't have visibility into that.

thheller13:05:49

I don' tthinkg to ... since its after the shadow-cljs code is laoded

thheller13:05:35

If you create a reproducible example I can take a look

thheller13:05:08

but its a really simple setup and other are using it

enn13:05:58

hm, ok. I will see what I can do.

thheller13:05:39

thats all you should need

colinkahn23:05:39

I’m having issues with using :preloads, here’s my config:

{:deps true
 :nrepl {:port 9000
         :middleware [cider.nrepl/cider-middleware
                      cider.piggieback/wrap-cljs-repl]}
 :builds
 {:stories {:target :npm-module
            :module-loader true
            :output-dir "out/stories"
            :devtools {:preloads [some.namespace.i.want.loaded.first]}}}}

lilactown23:05:35

what’s the issue?

colinkahn23:05:34

afaict the file isn’t loaded, I have a println in it which I assume I should see when the page loads

colinkahn23:05:59

btw this is a modified version of the storybook example: https://github.com/shadow-cljs/examples/tree/master/cljs-storybook