Fork me on GitHub
#shadow-cljs
<
2021-02-01
>
Henry14:02:25

IIRC, http://shadow-cljs.org used to have a homepage. It is now linked back to the GitHub repo instead, is it intentional? Also, is the latest docs still the User Guide Version 1.0 dated Jan 10, 2018? Thanks!

thheller14:02:18

I never bother to update the date on the docs. doesn't mean anything anyways. it is still current. The homepage I'll restore when I have time, not high prio right now

Henry15:02:59

Excellent to know. The GitHub repo is indeed very resourceful and full of helpful information already. Many thanks for creating and maintaining such a fantastic and important tool.

Ray Stubbs17:02:36

Hi all, I'm having some difficulty with dynamic module loading. The error returned by the loader doesn't give much info, but pasting the generated js into the console gives me the following. Anybody know how to fix this?

thheller18:02:53

could be related to how you are loading the files. pasting code into the console is not something you should be doing

Ray Stubbs18:02:20

Not a familiar issue then huh? Yeah the pasting was a last attempt to get some useful error info (maybe it's misleading though?), the actual error returned by the loader just says... 1.

thheller18:02:29

it could be polyfill problems. try deleting .shadow-cljs/builds/<build-id>/dev and rebuild

thheller18:02:47

but diagnosing things by loading it in the console is making things harder not easier

thheller18:02:11

the loader you can easily skip by just making a HTML file and putting script tags after each other for all the files it is supposed to load

thheller18:02:14

in the correct order of course

thheller18:02:26

but no need to use the loader

Ray Stubbs18:02:09

It's only happening in a prod environment unfortunately, so deleting the build files probably won't help... though it may be worth looking into whether those are cleared on the server before each build. Copying into a script tag is probably worth trying too, but putting the code into the original html file won't work, since it's not a dev environment. Anyway, thanks for the help, I'll continue to play around with it.

Ray Stubbs22:02:59

Thanks for the help @thheller, your suggestion of clearing the .shadow-cljs let me repro the issue locally, turned out to be a bug in an outdated version of shadow-cljs.

hadils17:02:36

Hi. I loaded a react native npm package and its peer dependencies into my project. They are present in my package.json file and my require is correct, but

[:> ls/LoginScreen]
returns
[:> nil]
I am wondering if using Expo SDK 40 and react 17.0.0 might be causing this problem. Any thoughts?

thheller18:02:22

@hadilsabbagh18 what is ls? what is your require? read the section about :default, maybe thats it https://shadow-cljs.github.io/docs/UsersGuide.html#_using_npm_packages

hadils18:02:48

@thheller Sorry

(require '["react-native-login-screen" :as le])

thheller18:02:32

I don't know the package but it might be :default LoginScreen

hadils18:02:07

Ok let me try that.

hadils18:02:57

That works! Thanks a lot @thheller!!!